fix: serialize msgs.buttons and delete msgs from chat model (#402)

Co-authored-by: yuvalFishler <yuvalf@realfriend.ai>

close #386
This commit is contained in:
yuvalfis
2020-11-02 00:32:46 +02:00
committed by GitHub
parent 42dd866a53
commit e520a96b20

View File

@@ -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;
};