mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
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
This commit is contained in:
@@ -23,8 +23,9 @@ const MSG_MISSED_CALL_TYPES = new Set([
|
|||||||
|
|
||||||
/** Cleans a received message to further processing */
|
/** Cleans a received message to further processing */
|
||||||
export const cleanMessage = (message: proto.IWebMessageInfo, meId: string) => {
|
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.remoteJid = jidNormalizedUser(message.key.remoteJid!)
|
||||||
|
message.key.participant = message.key.participant ? jidNormalizedUser(message.key.participant!) : undefined
|
||||||
const content = normalizeMessageContent(message.message)
|
const content = normalizeMessageContent(message.message)
|
||||||
// if the message has a reaction, ensure fromMe & remoteJid are from our perspective
|
// if the message has a reaction, ensure fromMe & remoteJid are from our perspective
|
||||||
if(content?.reactionMessage) {
|
if(content?.reactionMessage) {
|
||||||
|
|||||||
Reference in New Issue
Block a user