From 512d45c5bdb97f511487ea23e2af69811f2d8883 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Sat, 9 May 2020 19:47:17 +0530 Subject: [PATCH] Added callback for delivery & read receipts + Bug Fix --- WhatsAppWeb.Recv.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WhatsAppWeb.Recv.js b/WhatsAppWeb.Recv.js index 95b6b0b..84d0440 100644 --- a/WhatsAppWeb.Recv.js +++ b/WhatsAppWeb.Recv.js @@ -115,7 +115,9 @@ module.exports = function(WhatsAppWeb) { type = json[1].type 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") { this.onNewMessage(json[2]) // handle this new message