Detect new login

This commit is contained in:
Adhiraj Singh
2020-11-14 14:12:04 +05:30
parent 6d02d405a7
commit 7a80bc1b92
4 changed files with 22 additions and 9 deletions

View File

@@ -356,7 +356,9 @@ export class WAConnection extends EventEmitter {
//throw new Error("You're not even connected, you can't log out")
await new Promise(resolve => this.conn.send('goodbye,["admin","Conn","disconnect"]', null, resolve))
}
this.user = null
this.user = undefined
this.chats.clear()
this.contacts = {}
this.close()
}
/** Close the connection to WhatsApp Web */