Added callback for delivery & read receipts + Bug Fix

This commit is contained in:
Adhiraj
2020-05-09 19:47:17 +05:30
parent 26f53f8b61
commit 512d45c5bd

View File

@@ -115,7 +115,9 @@ module.exports = function(WhatsAppWeb) {
type = json[1].type type = json[1].type
break break
} }
this.handlers.onMessageStatusChanged (json[1].jid, json[1].index, type) if (this.handlers.onMessageStatusChanged) {
this.handlers.onMessageStatusChanged (json[1].jid, json[1].index, type)
}
} }
} else if (json[0] === "message") { } else if (json[0] === "message") {
this.onNewMessage(json[2]) // handle this new message this.onNewMessage(json[2]) // handle this new message