Deprecated message-new & message-update + fix presence update for groups

The chat-update event is fired now when a message is received/updated
This commit is contained in:
Adhiraj Singh
2020-11-13 16:07:08 +05:30
parent eaf56f6d71
commit eace0c1795
6 changed files with 59 additions and 39 deletions

View File

@@ -189,7 +189,7 @@ export class WAConnection extends Base {
chat.jid = Utils.whatsappID (chat.jid)
chat.t = +chat.t
chat.count = +chat.count
chat.messages = new KeyedDB (Utils.waMessageKey, Utils.WA_MESSAGE_ID)
chat.messages = Utils.newMessagesDB()
// chats data (log json to see what it looks like)
!chats.get (chat.jid) && chats.insert (chat)