Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Receive Emoji Reactions to Message #275

Closed
ehussain opened this issue Mar 14, 2024 · 1 comment
Closed

[Feature Request] Receive Emoji Reactions to Message #275

ehussain opened this issue Mar 14, 2024 · 1 comment

Comments

@ehussain
Copy link

ehussain commented Mar 14, 2024

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
Copy link
Contributor

devlikepro commented Mar 15, 2024

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).

  • payload.reaction.text - emoji that was used to react to the message. It’ll be an empty string if the reaction was removed.
  • payload.reaction.messageId - id of the message that was reacted to.
{
    "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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants