diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 8d52009..8032734 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -532,7 +532,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { const handleReceipt = async(node: BinaryNode) => { const { attrs, content } = node - const isNodeFromMe = areJidsSameUser(attrs.participant || attrs.from, authState.creds.me?.id) + const isLid = attrs.from.includes('lid') + const isNodeFromMe = areJidsSameUser(attrs.participant || attrs.from, isLid ? authState.creds.me?.lid : authState.creds.me?.id) const remoteJid = !isNodeFromMe || isJidGroup(attrs.from) ? attrs.from : attrs.recipient const fromMe = !attrs.recipient || (attrs.type === 'retry' && isNodeFromMe) diff --git a/src/Utils/decode-wa-message.ts b/src/Utils/decode-wa-message.ts index 4b8537e..3cbbff3 100644 --- a/src/Utils/decode-wa-message.ts +++ b/src/Utils/decode-wa-message.ts @@ -82,7 +82,7 @@ export function decodeMessageNode( throw new Boom('Unknown message type', { data: stanza }) } - const fromMe = isMe(stanza.attrs.participant || stanza.attrs.from) + const fromMe = (isLidUser(from) ? isMeLid : isMe)(stanza.attrs.participant || stanza.attrs.from) const pushname = stanza.attrs.notify const key: WAMessageKey = {