Skip to content

Commit

Permalink
fix: serialize msgs.buttons and delete msgs from chat model (#402)
Browse files Browse the repository at this point in the history
Co-authored-by: yuvalFishler <yuvalf@realfriend.ai>

close #386
  • Loading branch information
yuvalfis committed Nov 1, 2020
1 parent 42dd866 commit e520a96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/util/Injected.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand All @@ -221,6 +223,8 @@ exports.LoadUtils = () => {
res.groupMetadata = chat.groupMetadata.serialize();
}

delete res.msgs;

return res;
};

Expand Down

0 comments on commit e520a96

Please sign in to comment.