From e520a96b209d9bd16b5b7af02d514048e68d82ea Mon Sep 17 00:00:00 2001 From: yuvalfis Date: Mon, 2 Nov 2020 00:32:46 +0200 Subject: [PATCH] fix: serialize msgs.buttons and delete msgs from chat model (#402) Co-authored-by: yuvalFishler close #386 --- src/util/Injected.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/Injected.js b/src/util/Injected.js index dabc6ea..a559a43 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -205,7 +205,9 @@ exports.LoadUtils = () => { window.WWebJS.getMessageModel = message => { const msg = message.serialize(); msg.isStatusV3 = message.isStatusV3; - + if (msg.buttons) { + msg.buttons = msg.buttons.serialize(); + } delete msg.pendingAckUpdate; return msg; }; @@ -221,6 +223,8 @@ exports.LoadUtils = () => { res.groupMetadata = chat.groupMetadata.serialize(); } + delete res.msgs; + return res; };