From 54a4548c1bf7577fa0cb4708adf7427755836e1d Mon Sep 17 00:00:00 2001 From: Samuel Rodrigues Almeida Costa Date: Sun, 7 Sep 2025 08:08:41 -0300 Subject: [PATCH] Update decode-wa-message.ts (#1654) When the cell phone connected to the instance (Baileys) sends a message to a contact (fromMe = true), the senderPn comes as undefined. This fix fixes this problem temporarily. --- src/Utils/decode-wa-message.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/decode-wa-message.ts b/src/Utils/decode-wa-message.ts index fc210f48..394be1b9 100644 --- a/src/Utils/decode-wa-message.ts +++ b/src/Utils/decode-wa-message.ts @@ -111,7 +111,7 @@ export function decodeMessageNode(stanza: BinaryNode, meId: string, meLid: strin fromMe, id: msgId, senderLid: stanza?.attrs?.sender_lid, - senderPn: stanza?.attrs?.sender_pn, + senderPn: stanza?.attrs?.sender_pn || stanza?.attrs?.peer_recipient_pn, participant, participantPn: stanza?.attrs?.participant_pn, participantLid: stanza?.attrs?.participant_lid,