feat: support message replies and reactions

This commit is contained in:
Tim
2025-08-25 16:42:14 +08:00
parent 0ee58df868
commit 175ab79b27
14 changed files with 207 additions and 32 deletions

View File

@@ -138,7 +138,9 @@ const toggleReaction = async (type) => {
const url =
props.contentType === 'post'
? `${API_BASE_URL}/api/posts/${props.contentId}/reactions`
: `${API_BASE_URL}/api/comments/${props.contentId}/reactions`
: props.contentType === 'comment'
? `${API_BASE_URL}/api/comments/${props.contentId}/reactions`
: `${API_BASE_URL}/api/messages/${props.contentId}/reactions`
// optimistic update
const existingIdx = reactions.value.findIndex(