Fix pfp change notification (#323)

* Crash if chat is already deleted

* Crash if chat is already deleted (#321) (#322)

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Fix store errors

* Fix hash issue

* Fix eslint

* Update messages-recv.ts

* Update messages-recv.ts

* ESLint final

* no more eslint errors!
This commit is contained in:
Codeboss
2024-04-28 13:44:53 +03:00
committed by GitHub
parent 9d2f9ed4e3
commit 3b87d74f04
2 changed files with 26 additions and 7 deletions

View File

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