Merge pull request #1432 from telmark-colony/ensure-message-key-is-correct-when-receive-server-ack

Consider `isNodeFromMe` for `key.fromMe` when receive message status `SERVER_ACK`
This commit is contained in:
Cassio Santos
2025-05-21 06:27:04 -03:00
committed by GitHub

View File

@@ -608,7 +608,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
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)
const fromMe = !attrs.recipient || (
(attrs.type === 'retry' || attrs.type === 'sender')
&& isNodeFromMe
)
const key: proto.IMessageKey = {
remoteJid,