fix: incorrect media appearance after reaction
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user