WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.17k stars 1.1k forks source link

[BUG] Send message to announcements group of a community, but people can't reply/react to the message. #857

Open DFectuoso opened 1 month ago

DFectuoso commented 1 month ago

Describe the bug I have a community group, with its announcements channel. When I send a message from the whatsapp client, people can reply and react to it. When I send it with Baileys with

await sock.sendMessage("xxxx@g.us", { text: message) });

Users can't reply or react to that message.

Do I need to send a special flag or different metadata to send a message that people can reply and react to?

To Reproduce Send a message to an announcement group with the next code:

await sock.sendMessage("xxxx@g.us", { text: message) });

Expected behavior Users should be able to reply and/or react to that message, but they can't.

vinikjkkj commented 3 weeks ago

The pools and reactions are sent different than normal group, reactions are encrypted

DFectuoso commented 4 days ago

I have been researching a bit about messages send from the normal client vs messages i am trying to send with sendMessage.

A message send to the announcements group that is able to get replies and reactions like:

image

And creates a screen for the replies:

image

Seems to be received like:

Message Received: xxxxx@g.us

{
  key: {
    remoteJid: 'xxxxxxxxxx@g.us',
    fromMe: false,
    id: 'xxxxx',
    participant: 'xxxxx@s.whatsapp.net'
  },
  messageTimestamp: 1720833409,
  pushName: 'name',
  broadcast: false,
  message: Message {
    conversation: 'TEST',
    messageContextInfo: MessageContextInfo { messageSecret: [Uint8Array] }
  }
}

But if I send it with sendMessage, it does not allow for this kind of interactions, not sure what i could send different in the options of sendMessage to make it behave like this?

DFectuoso commented 4 days ago

This is all related to this feature from Whatsapp: https://faq.whatsapp.com/1859295147860069/?helpref=faq_content

PurpShell commented 3 days ago

The pools and reactions are sent different than normal group, reactions are encrypted

100%, like Meta AI and other message secret encrpytion schemes (messageAddons)

The problem is bigger than this though, we need to update the protobuf to do this I think