mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user