mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user