Added callback for delivery & read receipts

This commit is contained in:
Adhiraj
2020-05-09 18:31:58 +05:30
parent 266e695b3d
commit 91cfbd1412
7 changed files with 57 additions and 9 deletions

View File

@@ -175,7 +175,7 @@ module.exports = function (WhatsAppWeb) {
WhatsAppWeb.prototype.disconnect = function () {
if (this.status === Status.connected) {
this.conn.send('goodbye,["admin","Conn","disconnect"]', null, () => {
this.conn.close()
this.close()
if (this.handlers.onDisconnect)
this.handlers.onDisconnect()
})