From cf514fa8d7ac10e490c96b1bafe6fee1424bf6e6 Mon Sep 17 00:00:00 2001 From: Gustavo Quadri <87215048+gusquadri@users.noreply.github.com> Date: Wed, 18 Jun 2025 08:30:19 -0300 Subject: [PATCH] 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 --- src/Utils/messages.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Utils/messages.ts b/src/Utils/messages.ts index 860b8e1..0b6657a 100644 --- a/src/Utils/messages.ts +++ b/src/Utils/messages.ts @@ -725,10 +725,8 @@ export const updateMessageWithReaction = (msg: Pick, 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 }