fix presence.lastSeen is always undefined (https://github.com/adiwajshing/Baileys/issues/1377) (#1389)

Co-authored-by: morok <morok@nanofo.com>
This commit is contained in:
morrakan
2022-03-21 15:15:04 +02:00
committed by GitHub
parent 93c8db319e
commit 9b8b3c3b70

View File

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