From dfc030b453d65dc547f12711acbc53b5ea3f33a0 Mon Sep 17 00:00:00 2001 From: Adhiraj Singh Date: Thu, 23 Jun 2022 22:20:36 +0530 Subject: [PATCH] fix: NaN last seen --- src/Socket/chats.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Socket/chats.ts b/src/Socket/chats.ts index f7e1892..f6ecfcd 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -436,7 +436,7 @@ export const makeChatsSocket = (config: SocketConfig) => { if(tag === 'presence') { presence = { lastKnownPresence: attrs.type === 'unavailable' ? 'unavailable' : 'available', - lastSeen: attrs.last ? +attrs.last : undefined + lastSeen: attrs.last && attrs.last !== 'deny' ? +attrs.last : undefined } } else if(Array.isArray(content)) { const [firstChild] = content