pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.46k stars 3.68k forks source link

can't replay group message #3012

Closed zhaojunfeng closed 6 months ago

zhaojunfeng commented 6 months ago

Is there an existing issue for this?

Describe the bug

Use the following code to reply a chat message, it works well. but can't reply a group chat message.

const sentMessage = await wbot.sendMessage( '120363225536105835@g.us', formatBody(body, ticket.contact), { quotedMessageId: 'false_120363225536105835@g.us_3A83AA8369D79D099479 ', linkPreview: false } );

Expected behavior

How can I reply a group chat message?

Steps to Reproduce the Bug or Issue

I want to reply group message, I tried two ways, but failed:

  1. const quotedMsg = await wbot.getMessageById('false_120363225536105835@g.us_3A83AA8369D79D099479 ' || ""); quotedMsg.reply("quote msg");

  2. const sentMessage = await wbot.sendMessage( '120363225536105835@g.us', formatBody(body, ticket.contact), { quotedMessageId: 'false_120363225536105835@g.us_3A83AA8369D79D099479 ', linkPreview: false } );

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS:Windows whatsapp-web.js version :1.23.1-alpha.5 WhatsApp Web version [run await client.getWWebVersion()]:2.2412.1 Node.js Version : v16.20.1

Additional context

No response

alechkos commented 6 months ago

Everything works fine

zhaojunfeng commented 6 months ago

Everything works fine 1715337675025 client.sendMessage('120363225536105835@g.us','test from shell', {quotedMessageId: 'false_120363225536105835@g.us_3A83AA8369D79D099479'});

it is not fine~

N0N4M3BNS commented 4 weeks ago

Same to me ERROR: Evaluation failed: Error: Could not get the quoted message.

N0N4M3BNS commented 3 weeks ago

@zhaojunfeng you already found the issues?