Closed jianhuihi closed 2 weeks ago
https://github.com/WhiskeySockets/Baileys/blob/5bdfc631058fdb0f7a83b6865339b134a3f62453/src/Socket/messages-recv.ts#L397C1-L398C1
Baileys/src/Socket/messages-recv.ts
node value { tag: 'notification', attrs: { from: 'xxxx@s.whatsapp.net', type: 'picture', id: 'xxx', notify: 'xxx', t: '1721294595' }, content: [ { tag: 'set', attrs: [Object], content: undefined } ] }
const setPicture = getBinaryNodeChild(node, 'set') const delPicture = getBinaryNodeChild(node, 'delete') ev.emit('contacts.update', [{ id: jidNormalizedUser(node?.attrs?.jid) || ((setPicture || delPicture)?.attrs?.hash) || '', imgUrl: setPicture ? 'changed' : 'removed' }])
id: jidNormalizedUser(node?.attrs?.jid) || ((setPicture || delPicture)?.attrs?.hash) || '',
result is ''
id: jidNormalizedUser(node?.attrs?.jid) >>
id: jidNormalizedUser(node?.attrs?.jid) || from || ((setPicture || delPicture)?.attrs?.hash) || '',
https://github.com/WhiskeySockets/Baileys/pull/906
https://github.com/WhiskeySockets/Baileys/blob/5bdfc631058fdb0f7a83b6865339b134a3f62453/src/Socket/messages-recv.ts#L397C1-L398C1
Baileys/src/Socket/messages-recv.ts
node value { tag: 'notification', attrs: { from: 'xxxx@s.whatsapp.net', type: 'picture', id: 'xxx', notify: 'xxx', t: '1721294595' }, content: [ { tag: 'set', attrs: [Object], content: undefined } ] }
id: jidNormalizedUser(node?.attrs?.jid) || ((setPicture || delPicture)?.attrs?.hash) || '',
result is ''