From bba34b0c36aa3f1b43865ec475a1dfec094732be Mon Sep 17 00:00:00 2001 From: Codeboss <131376628+codebossdev@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:33:13 +0300 Subject: [PATCH] no more eslint errors! --- src/Socket/messages-recv.ts | 2 +- src/Store/make-in-memory-store.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 6e8bf3b800e..e74d1f08fbf 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -357,7 +357,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { ev.emit('contacts.update', [{ id: jidNormalizedUser(node?.attrs?.jid) || ((setPicture || delPicture)?.attrs?.hash) || '', - imgUrl: setPicture ? 'changed' : "removed" + imgUrl: setPicture ? 'changed' : 'removed' }]) if(isJidGroup(from)) { diff --git a/src/Store/make-in-memory-store.ts b/src/Store/make-in-memory-store.ts index c37c0a27853..b623442c758 100644 --- a/src/Store/make-in-memory-store.ts +++ b/src/Store/make-in-memory-store.ts @@ -170,13 +170,13 @@ export default ( ev.on('contacts.update', async updates => { for(const update of updates) { - let contact: Contact; + let contact: Contact if(contacts[update.id!]) { contact = contacts[update.id!] } else { const contactHashes = await Promise.all(Object.keys(contacts).map(async a => { - return (await md5(Buffer.from(a + 'WA_ADD_NOTIF', 'utf8'))).toString('base64').slice(0,3) - })); + return (await md5(Buffer.from(a + 'WA_ADD_NOTIF', 'utf8'))).toString('base64').slice(0, 3) + })) contact = contacts[contactHashes.find(a => a === update.id) || ''] }