devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
820 stars 249 forks source link

[Feature Request] Receive Emoji Reactions to Message #275

Closed ehussain closed 3 months ago

ehussain commented 3 months ago

Is your feature request related to a problem? Please describe. I'm always frustrated when [...]

I would like to receive a webhook or an api call when someone in conversation reacts to the message via emoji.

Describe the solution you'd like

Receive a webhook for any emoji reaction to any message.

Describe alternatives you've considered

May be API call to extract the emoji reactions. But it not reliable because it involves polling.

patron:ADVANCED

devlikepro commented 3 months ago

Hi! We've added message.reaction Please remember to add message.reaction in events when you start a session

{
  "name": "default",
  "config": {
    "webhooks": [
      {
        "url": "https://httpbin.org/post",
        "events": [
          "message.reaction"
        ]
      }
    ]
  }
}

Receive events when a message is reacted to by a user (or yourself reacting to a message).

{
    "event": "message.reaction",
    "session": "default",
    "me": {
        "id": "79222222222@c.us",
        "pushName": "WAHA"
    },
    "payload": {
        "id": "false_79111111@c.us_11111111111111111111111111111111",
        "from": "79111111@c.us",
        "fromMe": false,
        "participant": "79111111@c.us",
        "to": "79111111@c.us",
        "timestamp": 1710481111.853,
        "reaction": {
            "text": "🙏",
            "messageId": "true_79111111@c.us_11111111111111111111111111111111"
        }
    },
    "engine": "WEBJS",
    "environment": {
        "version": "2024.3.3",
        "engine": "WEBJS",
        "tier": "PLUS",
        "browser": "/usr/bin/google-chrome-stable"
    }
}

👉NOWEB engine note - reactions were sent in 'message' and 'message.any' events, not it's available only in 'message.reaction'!

patron:PRO