fix: Fixed contacts.update when received changed picture event (#979)

This commit is contained in:
Cleiton Carvalho
2024-08-19 19:47:35 -03:00
committed by GitHub
parent 0011d61df1
commit c02b772de0

View File

@@ -414,7 +414,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const delPicture = getBinaryNodeChild(node, 'delete')
ev.emit('contacts.update', [{
id: jidNormalizedUser(node?.attrs?.jid) || ((setPicture || delPicture)?.attrs?.hash) || '',
id: jidNormalizedUser(node?.attrs?.from) || ((setPicture || delPicture)?.attrs?.hash) || '',
imgUrl: setPicture ? 'changed' : 'removed'
}])