Sending a message with a quotedMessageId will result in the following exception:
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'unsafe')
at window.WWebJS.sendMessage (pptr://__puppeteer_evaluation_script__:54:67)
at pptr://__puppeteer_evaluation_script__:10:45
at ExecutionContext._ExecutionContext_evaluate (/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:229:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (/node_modules/whatsapp-web.js/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
at async Client.sendMessage (/node_modules/whatsapp-web.js/src/Client.js:947:28)
Is there an existing issue for this?
Describe the bug
Hi there,
Sending a message with a
quotedMessageId
will result in the following exception:Caused by (/src/util/injected/Utils.js)
https://github.com/pedroslopez/whatsapp-web.js/blob/066d8fa75ebc13b9cc74cfcd18ffd847b79be998/src/util/Injected/Utils.js#L45-L58
Expected behavior
N/A
Steps to Reproduce the Bug or Issue
client.sendMessage()
with a validquotedMessageId
in theMessageSendOptions
object.Relevant Code
client.sendMessage(chatId, body, { quotedMessageId: "false_3XXXXXXXXXX@c.us_3ACXXXXXXXXXXXXXXX98" });
Browser Type
Google Chrome
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
Additional context
No response