Compare commits

...

1 Commits

Author SHA1 Message Date
Renato Alcara 3565f67809 fix: normalise remoteJid in reaction/poll keys for fromMe messages
In DMs, when the connected user sends a reaction, the inner key's
remoteJid could remain unnormalized (e.g. LID vs PN), preventing
correct matching with the original message. Also normalises participant
in groups for own messages — an improvement over upstream Baileys#2386.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 23:59:19 -03:00
+8
View File
@@ -113,6 +113,14 @@ export const cleanMessage = (message: WAMessage, meId: string, meLid: string) =>
msgKey.remoteJid = message.key.remoteJid msgKey.remoteJid = message.key.remoteJid
// set participant of the message // set participant of the message
msgKey.participant = msgKey.participant || message.key.participant msgKey.participant = msgKey.participant || message.key.participant
} else {
// fromMe reactions/polls: normalise remoteJid to match the chat JID
// ensures DM reaction keys are consistent with group behavior
msgKey.remoteJid = message.key.remoteJid
// in groups, normalise participant for own messages too
if (message.key.participant) {
msgKey.participant = msgKey.participant || message.key.participant
}
} }
} }
} }