mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
contact upsert fix
This commit is contained in:
@@ -229,10 +229,9 @@ const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
socketEvents.on ('CB:action,,user', json => {
|
socketEvents.on('CB:action,,user', (json: BinaryNode) => {
|
||||||
const node = json[2][0]
|
if(Array.isArray(json.data)) {
|
||||||
if (node) {
|
const user = json.data[0].attributes as any as Contact
|
||||||
const user = node[1] as Contact
|
|
||||||
user.jid = whatsappID(user.jid)
|
user.jid = whatsappID(user.jid)
|
||||||
|
|
||||||
ev.emit('contacts.upsert', [user])
|
ev.emit('contacts.upsert', [user])
|
||||||
|
|||||||
Reference in New Issue
Block a user