fix: incorrect media appearance after reaction
CI / Go (build + vet + test) (push) Canceled after 0s
CI / Web (build + lint) (push) Canceled after 0s

This commit is contained in:
vantablackTea
2026-09-27 22:12:45 +03:00
parent 9d03ea4c51
commit 855a62755c
2 changed files with 13 additions and 2 deletions
+7 -2
View File
@@ -263,12 +263,17 @@ export default function ChatApp({ user }: ChatAppProps) {
const updated = mine
? await api.removeReaction(message.conversation_id, message.id, emoji)
: await api.addReaction(message.conversation_id, message.id, emoji)
upsert(updated)
patchMessage(message.id, (current) => ({
...current,
...updated,
media: updated.media ?? current.media,
reactions: updated.reactions,
}))
} catch {
return
}
},
[upsert, user.id],
[patchMessage, user.id],
)
const sendTyping = useCallback(