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
commit e520a96b20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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