Add name to presence update

This commit is contained in:
Adhiraj Singh
2020-11-17 17:12:14 +05:30
parent cea702b5a3
commit f29c5cf206
4 changed files with 7 additions and 3 deletions

View File

@@ -322,7 +322,11 @@ export class WAConnection extends Base {
contact.lastSeen = unixTimestampSeconds()
}
contact.lastKnownPresence = update.type
const presence: WAPresenceData = { lastKnownPresence: contact.lastKnownPresence, lastSeen: contact.lastSeen }
const presence: WAPresenceData = {
lastKnownPresence: contact.lastKnownPresence,
lastSeen: contact.lastSeen,
name: contact.name || contact.vname || contact.notify
}
const chat = this.chats.get(chatId)
if (chat) {