From ed57b9700efd72f3de7c0c8d658d24b41f4da5d9 Mon Sep 17 00:00:00 2001 From: Edgard Date: Sat, 22 Jan 2022 16:46:47 -0300 Subject: [PATCH] fix: Fixed getMessageById where the message is from status (fix #823) --- package-lock.json | 16 ++++++++-------- package.json | 2 +- src/lib/wapi/functions/get-message-by-id.js | 8 +------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4069e79fe..3c8fc152f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,10 +6,10 @@ "packages": { "": { "name": "@wppconnect-team/wppconnect", - "version": "1.12.2", + "version": "1.12.3", "license": "LGPL-3.0-or-later", "dependencies": { - "@wppconnect/wa-js": "^1.1.9", + "@wppconnect/wa-js": "^1.1.10", "@wppconnect/wa-version": "^1.1.27", "atob": "^2.1.2", "axios": "^0.25.0", @@ -3312,9 +3312,9 @@ } }, "node_modules/@wppconnect/wa-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@wppconnect/wa-js/-/wa-js-1.1.9.tgz", - "integrity": "sha512-by2WB9jeFWalbXT3Poa4p3CzhWDhTEnLpGvjmihy1jBXdOWzJF+M21wWVeIbIyrar36VSi61Q5Q6JT3g3Eid/g==" + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@wppconnect/wa-js/-/wa-js-1.1.10.tgz", + "integrity": "sha512-lMkNOu8QAQ3IDX0xdegsQvDXFOD56NNMPGJJoY93DN/Y25Gf0tL4wPSjgxpbjnYf8qox8HH7xqeO9nxOutYVng==" }, "node_modules/@wppconnect/wa-version": { "version": "1.1.27", @@ -19091,9 +19091,9 @@ "requires": {} }, "@wppconnect/wa-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@wppconnect/wa-js/-/wa-js-1.1.9.tgz", - "integrity": "sha512-by2WB9jeFWalbXT3Poa4p3CzhWDhTEnLpGvjmihy1jBXdOWzJF+M21wWVeIbIyrar36VSi61Q5Q6JT3g3Eid/g==" + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@wppconnect/wa-js/-/wa-js-1.1.10.tgz", + "integrity": "sha512-lMkNOu8QAQ3IDX0xdegsQvDXFOD56NNMPGJJoY93DN/Y25Gf0tL4wPSjgxpbjnYf8qox8HH7xqeO9nxOutYVng==" }, "@wppconnect/wa-version": { "version": "1.1.27", diff --git a/package.json b/package.json index 4ad2f5f5e..696810ff6 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@wppconnect/wa-js": "^1.1.9", + "@wppconnect/wa-js": "^1.1.10", "@wppconnect/wa-version": "^1.1.27", "atob": "^2.1.2", "axios": "^0.25.0", diff --git a/src/lib/wapi/functions/get-message-by-id.js b/src/lib/wapi/functions/get-message-by-id.js index da6c5ad83..2fc4d36a0 100644 --- a/src/lib/wapi/functions/get-message-by-id.js +++ b/src/lib/wapi/functions/get-message-by-id.js @@ -26,13 +26,7 @@ export async function getMessageById(id, done, serialize = true) { return false; } - const key = WPP.whatsapp.MsgKey.fromString(id); - - if (!key) { - return false; - } - - const msg = await WPP.chat.getMessageById(key.remote, key.toString()); + const msg = await WPP.chat.getMessageById(id); if (!msg) { return false;