From 9b8b3c3b70fd1057031d97723e120b1da40894bb Mon Sep 17 00:00:00 2001 From: morrakan <47677510+morrakan@users.noreply.github.com> Date: Mon, 21 Mar 2022 15:15:04 +0200 Subject: [PATCH] fix presence.lastSeen is always undefined (https://github.com/adiwajshing/Baileys/issues/1377) (#1389) Co-authored-by: morok --- 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 b5a127c..5ee8bbb 100644 --- a/src/Socket/chats.ts +++ b/src/Socket/chats.ts @@ -412,7 +412,7 @@ export const makeChatsSocket = (config: SocketConfig) => { if(tag === 'presence') { presence = { lastKnownPresence: attrs.type === 'unavailable' ? 'unavailable' : 'available', - lastSeen: attrs.t ? +attrs.t : undefined + lastSeen: attrs.last ? +attrs.last : undefined } } else if(Array.isArray(content)) { const [firstChild] = content