fix message recv fromMe flag

This commit is contained in:
Adhiraj Singh
2021-09-29 12:36:40 +05:30
parent 173d1ddf8b
commit 15d14836ce

View File

@@ -401,11 +401,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
ids.push(...items.map(i => i.attrs.id))
}
const remoteJid = attrs.recipient || attrs.from
const fromMe = attrs.recipient ? false : true
ev.emit('messages.update', ids.map(id => ({
key: {
remoteJid: attrs.from,
remoteJid,
id: id,
fromMe: true,
fromMe,
participant: attrs.participant
},
update: { status }