From 26f53f8b613bd6161bde4dd193ec71ece3c05dc6 Mon Sep 17 00:00:00 2001 From: Adhiraj Date: Sat, 9 May 2020 19:44:43 +0530 Subject: [PATCH] Receive message bug fix --- WhatsAppWeb.Recv.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WhatsAppWeb.Recv.js b/WhatsAppWeb.Recv.js index 0a4fc7d..95b6b0b 100644 --- a/WhatsAppWeb.Recv.js +++ b/WhatsAppWeb.Recv.js @@ -117,8 +117,8 @@ module.exports = function(WhatsAppWeb) { } this.handlers.onMessageStatusChanged (json[1].jid, json[1].index, type) } - } else if (json[1] === "message") { - this.onNewMessage( json[2][0][2] ) // handle this new message + } else if (json[0] === "message") { + this.onNewMessage(json[2]) // handle this new message } } else if (json[1].add === "before" || json[1].add === "last") { /*