From bc2889272fa5f2ee01d3eafbaae061c66eb789ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20de=20La=20Bourdonnaye?= Date: Sun, 14 Jun 2020 21:02:52 +0200 Subject: [PATCH] fix conversation result usage in loadEntireConversation In loadEntireConversation, json was an array of [result, request], now it only takes result into account --- WhatsAppWeb.Query.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WhatsAppWeb.Query.js b/WhatsAppWeb.Query.js index 850f5ff..14fdbff 100644 --- a/WhatsAppWeb.Query.js +++ b/WhatsAppWeb.Query.js @@ -102,7 +102,7 @@ module.exports = { const loadMessage = () => { return this.loadConversation(jid, chunkSize, offsetID, mostRecentFirst) - .then (json => { + .then (([json]) => { if (json[2]) { // callback with most recent message first (descending order of date) let lastMessage @@ -201,4 +201,4 @@ module.exports = { const json = ["query", "inviteCode", jid] return this.query (json).then (([json, _]) => json.code) } -} \ No newline at end of file +}