Skip to content

Commit

Permalink
[docs] message.reactions
Browse files Browse the repository at this point in the history
  • Loading branch information
allburov committed Apr 1, 2024
1 parent aca6232 commit 646c81f
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/site/content/en/docs/how-to/receive-messages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,43 @@ Fired on all message creations, including your own. The payload is the same as f
}
```

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

```json
{
"event": "message.reaction",
"session": "default",
"me": {
"id": "[email protected]",
"pushName": "WAHA"
},
"payload": {
"id": "[email protected]_11111111111111111111111111111111",
"from": "[email protected]",
"fromMe": false,
"participant": "[email protected]",
"to": "[email protected]",
"timestamp": 1710481111.853,
"reaction": {
"text": "🙏",
"messageId": "[email protected]_11111111111111111111111111111111"
}
},
"engine": "WEBJS",
"environment": {
"version": "2024.3.3",
"engine": "WEBJS",
"tier": "PLUS",
"browser": "/usr/bin/google-chrome-stable"
}
}
```

{{< alert icon="👉" text="NOWEB engine note - reactions were sent in 'message' and 'message.any' events, not it's available only in 'message.reaction'!" />}}

### message.ack
Receive events when server or recipient gets the message, read or played it.

Expand Down

0 comments on commit 646c81f

Please sign in to comment.