mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
Use JSON parse and stringify instead of serialize (#1653)
When puppeteer try to return serialized message with buttons, we get undefined instead of the message object, because the message serialized is not a JSON compatible (because of the buttons class)
This commit is contained in:
@@ -693,7 +693,7 @@ class Client extends EventEmitter {
|
||||
}
|
||||
|
||||
const msg = await window.WWebJS.sendMessage(chat, message, options, sendSeen);
|
||||
return msg.serialize();
|
||||
return JSON.parse(JSON.stringify(msg));
|
||||
}, chatId, content, internalOptions, sendSeen);
|
||||
|
||||
return new Message(this, newMessage);
|
||||
|
||||
Reference in New Issue
Block a user