fix: NaN last seen

This commit is contained in:
Adhiraj Singh
2022-06-23 22:20:36 +05:30
parent 8fa500a8a2
commit dfc030b453

View File

@@ -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