From bd98b138959875a4bd0213027907fe1b5bdcd782 Mon Sep 17 00:00:00 2001 From: fadiinho <94945604+fadiinho@users.noreply.github.com> Date: Mon, 13 Jun 2022 11:45:56 -0300 Subject: [PATCH] fix: reaction message doesn't appear when send to a group (#1700) * fix: reaction message doesn't appear when send to a group * use undefined instead of null --- src/Utils/process-message.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils/process-message.ts b/src/Utils/process-message.ts index 4a980b4..c7f3355 100644 --- a/src/Utils/process-message.ts +++ b/src/Utils/process-message.ts @@ -23,8 +23,9 @@ const MSG_MISSED_CALL_TYPES = new Set([ /** Cleans a received message to further processing */ export const cleanMessage = (message: proto.IWebMessageInfo, meId: string) => { - // ensure remoteJid doesn't have device or agent in it + // ensure remoteJid and participant doesn't have device or agent in it message.key.remoteJid = jidNormalizedUser(message.key.remoteJid!) + message.key.participant = message.key.participant ? jidNormalizedUser(message.key.participant!) : undefined const content = normalizeMessageContent(message.message) // if the message has a reaction, ensure fromMe & remoteJid are from our perspective if(content?.reactionMessage) {