devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
878 stars 273 forks source link

[feature] ability receive reactions in WEBJS session #179

Closed ehussain closed 1 month ago

ehussain commented 1 year ago

Hello,

We are looking for ability to send a reactions via api. Also webhook option to receive the reaction when someone reacts on whatsapp.

We are looking for this options on WEBJS session.

allburov commented 1 year ago

Hi! Doesn't it work? PUT /api/reaction works on both WEBJS and NOWEB (at least it should) https://waha.devlike.pro/docs/how-to/send-messages/#add-a-reaction-imagesversionscorepng

As I remember, you get new message event when you get a reaction on your message, but it's not certain. Have you tested it with reactions?

ehussain commented 1 year ago

Yes. I have tested. We are not receiving webhook for WEBJS version. I have tested with NOWEB and there we get webhook.

Receiving reaction is important feature that we are looking for.

allburov commented 1 year ago

I see, so the problem is only in receiving reactions, not in sending them, right? Just wanna understand the scope of the issue better

ehussain commented 1 year ago

Hello @allburov

I have tested all 4 scenarios and here is update.

  1. WEBJS - sending reactions is working
  2. NOWEB - sending reactions is working
  3. NOWEB - receiving reactions is working 4. WEBJS - receiving reactions is not working - we are not receiving webhook for this case.
allburov commented 1 year ago

Thank you, appreciate the details!🙏

ehussain commented 1 year ago

Hello @allburov approximately when this feature will be released?

allburov commented 1 year ago

Hi! Looking at how we can combine events from all engines to make some unique message.reaction event. No estimation here yet

devlikepro commented 1 month ago

Hah, it's working now, idk when we added it https://waha.devlike.pro/docs/how-to/webhooks/#messagereaction

{
  "event": "message.reaction",
  "session": "default",
  "me": {
    "id": "123123@c.us",
    "pushName": "Sim2"
  },
  "payload": {
    "id": "false_999999999@c.us_7AAAAAAAAAAAA",
    "from": "999999999@c.us",
    "fromMe": false,
    "participant": "999999999@c.us",
    "to": "123123@c.us",
    "timestamp": 1721294738.061,
    "reaction": {
      "text": "❤️",
      "messageId": "true_999999999@c.us_BBBBBBBBBBB"
    }
  },
  "engine": "WEBJS",
  "environment": {
    "version": "2024.7.5",
    "engine": "WEBJS",
    "tier": "PLUS",
    "browser": "/usr/bin/google-chrome-stable"
  }
}

Sorry for not closing the issue early

patron:PRO