got rid of redundancies

This commit is contained in:
Adhiraj
2020-08-21 20:36:44 +05:30
parent 47021c34bf
commit dcb06be944
7 changed files with 32 additions and 23 deletions

View File

@@ -129,6 +129,10 @@ export class WAConnection extends Base {
chat.t = +chat.t
chat.count = +chat.count
chat.messages = []
const oldChat = this.chats.get(chat.jid)
oldChat && this.chats.delete (oldChat)
this.chats.insert (chat) // chats data (log json to see what it looks like)
})