Remove depracations + add chat ping loop

This commit is contained in:
Adhiraj Singh
2021-02-12 16:54:31 +05:30
parent 9edef50f45
commit 482fa7090b
5 changed files with 32 additions and 17 deletions

View File

@@ -26,6 +26,8 @@ export class WAConnection extends Base {
// chats received
this.on('CB:response,type:chat', json => {
if (json[1].duplicate || !json[2]) return
this.chatsDebounceTimeout.cancel()
const chats = new KeyedDB(this.chatOrderingKey, c => c.jid)
json[2].forEach(([item, chat]: [any, WAChat]) => {