mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Fix Removed Reactions Events: Emit a Socket Event in "messages.reaction" (#1371)
* fix: emit event with empty reactions * chore: fix lint --------- Co-authored-by: Cassio Santos <cassio@economicros.com.br>
This commit is contained in:
@@ -725,10 +725,8 @@ export const updateMessageWithReaction = (msg: Pick<WAMessage, 'reactions'>, rea
|
||||
const authorID = getKeyAuthor(reaction.key)
|
||||
|
||||
const reactions = (msg.reactions || []).filter(r => getKeyAuthor(r.key) !== authorID)
|
||||
if (reaction.text) {
|
||||
reactions.push(reaction)
|
||||
}
|
||||
|
||||
reaction.text = reaction.text || ''
|
||||
reactions.push(reaction)
|
||||
msg.reactions = reactions
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user