mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix message recv fromMe flag
This commit is contained in:
@@ -401,11 +401,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
ids.push(...items.map(i => i.attrs.id))
|
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 => ({
|
ev.emit('messages.update', ids.map(id => ({
|
||||||
key: {
|
key: {
|
||||||
remoteJid: attrs.from,
|
remoteJid,
|
||||||
id: id,
|
id: id,
|
||||||
fromMe: true,
|
fromMe,
|
||||||
participant: attrs.participant
|
participant: attrs.participant
|
||||||
},
|
},
|
||||||
update: { status }
|
update: { status }
|
||||||
|
|||||||
Reference in New Issue
Block a user