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.
This commit is contained in:
Samuel Rodrigues Almeida Costa
2025-09-07 08:08:41 -03:00
committed by GitHub
parent 2f2c1dc25e
commit 54a4548c1b
+1 -1
View File
@@ -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,