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.53k stars 3.46k forks source link

Inbound message "Message via ad" is not received #2370

Open jonylim opened 11 months ago

jonylim commented 11 months ago

Is there an existing issue for this?

Describe the bug

Hi,

I have multiple occurrences that if an incoming message is a "Message via ad", it won't be received in the "message" callback.

Here is a screenshot of the example: wa-message-via-ad

Expected behavior

Incoming message should be received properly.

Steps to Reproduce the Bug or Issue

Send message via ad to the connected WhatsApp.

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Docker (node:lts-alpine3.14) WhatsApp-web.js version: v1.21.0 (latest) WhatsApp Web version: 2.2330.11 Node.js Version: v16.15.1

Additional context

No response

YisusCore commented 11 months ago

This is a frequently case and i couldn't do anithing for read the incomming message. A temporary solution is scan the chats list and compare it from the received messages chats, if I dont found it so is posible a case.

opssemnik commented 10 months ago

I think the biggest barrier to this bug is the fact that its only select locations that have this feature enabled

i wonder if these message have special properties

if you guys could do this, it would be helpful! const chat = await client.getContactById('contactid of the sent via ad chat') const messages = await chat.fetchMessages(); for (message of messages) { console.log(message) }

This would be useful to see if these messages have special properties on them

jonylim commented 7 months ago

Hi, is there any fix for this?

N0N4M3BNS commented 1 month ago

any solution?