diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 7a67cc3..6db257d 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -326,12 +326,6 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => { } } else { switch(child.tag) { - case 'count': - if(child.attrs.value === '0') { - logger.info('recv all pending notifications') - ev.emit('connection.update', { receivedPendingNotifications: true }) - } - break case 'devices': const devices = getBinaryNodeChildren(child, 'device') if(areJidsSameUser(child.attrs.jid, authState.creds!.me!.id)) { diff --git a/src/Socket/socket.ts b/src/Socket/socket.ts index 0005c7a..06dd674 100644 --- a/src/Socket/socket.ts +++ b/src/Socket/socket.ts @@ -495,9 +495,7 @@ export const makeSocket = ({ logger.info(`got ${offlineCount} offline messages/notifications`) - if(!offlineCount) { - ev.emit('connection.update', { receivedPendingNotifications: true }) - } + ev.emit('connection.update', { receivedPendingNotifications: true }) }) ws.on('CB:stream:error', (node: BinaryNode) => {