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
14.62k stars 3.48k forks source link

Why reply sometimes come in quote reply sometimes without quote? #2460

Closed putuoka closed 7 months ago

putuoka commented 10 months ago

Is there an existing issue for this?

Describe the bug

i just use const reply = msg.reply(response);

sometimes it come with quote like this:

Capture

sometimes it come without quote like this:

Capture2

Expected behavior

should appear consistent with or without quotes

Steps to Reproduce the Bug or Issue

const { Client, LocalAuth } = require("whatsapp-web.js");

// Whatsapp Integration
global.client = new Client({
  authStrategy: new LocalAuth(),
  puppeteer: {
    headless: true,
    args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-extensions"],
  },
});

client.on("message", async (msg) => {
  const reply = msg.reply(response);
}

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

windows 10 android whatsapp-web.js version 1.22.2-alpha.0

Additional context

No response

bnoagt commented 10 months ago

Have you tried to use message.reply using message.id.remote?

message.reply("yourtext", message.id.remote)

EDIT: Actually, I guess it's a real bug.

alechkos commented 7 months ago

Message.reply is supposed to quote the replied message