Reactions let users respond to a message with an emoji, like 👍 or 🎉, without sending a new message. They're great for quick "got it" replies in support chat, or voting in a team channel.
Where this fits: your app is connected to a conversation and shows messages. A reaction is attached to one message, and comes back as part of that message's data.
Use it
In your app:
await chat.messages.addReaction('msg_3xR…', '👍');
await chat.messages.removeReaction('msg_3xR…', '👍');
chat.on('reactionAdded', (event) => {
console.log(`${event.userId} reacted ${event.emoji}`);
});const { add, remove, pending } = useReactions();
await add('msg_3xR…', '👍');pending is true while a reaction call is running. Disable the button
while it's true.
await livqeno.chat!.messages.addReaction('msg_3xR…', '👍');
await livqeno.chat!.messages.removeReaction('msg_3xR…', '👍');await chat.addReaction(messageId, '👍');
await chat.removeReaction(messageId, '👍');
chat.reactions.listen((event) {
print('${event.userId} reacted ${event.emoji}');
});Everyone in the conversation gets a reactionAdded or reactionRemoved
event, so counts update live.
Safe to repeat
- Adding the same reaction twice does nothing the second time. No duplicate.
- Removing a reaction that isn't there still succeeds.
So a double-tap on a slow network is harmless. Each user can have one of each emoji per message. A user can add 👍 and 🎉 to the same message.
Grouped, not raw
Each message comes with its reactions already grouped by emoji:
"reactions": [
{ "emoji": "👍", "count": 3, "userIds": ["alice", "bob", "carol"] },
{ "emoji": "🎉", "count": 1, "userIds": ["dave"] }
]- Show "👍 3" straight from
count. - Use
userIdsto show "you reacted" or a tooltip of names. No extra request needed.
Limits
| Limit | Value |
|---|---|
| Reactions per message | 200 |
| Length of one reaction | 32 characters (enough for any emoji, even 👨👩👧👦) |
Livqeno doesn't check that a reaction is a real emoji. You can use custom
reactions, shortcodes like :shipit:, or image keys.
Common errors
| Problem | Cause | Fix |
|---|---|---|
| A second reaction doesn't show up | Adding the same (message, user, emoji) again does nothing. | This is expected. Treat it as success. |
INVALID_MESSAGE / validation error | The reaction is longer than 32 characters. | Limit custom shortcode length in your app. |
| Counts drift after a reconnect | Your app keeps its own count from events. | Use the message's reactions array as the source of truth. |
Production tips
- Show reactions from the message's
reactionsarray. Don't keep your own count; a reconnect could replay events and double it. - Disable the reaction button while its call is running (in React, use
pendingfromuseReactions()). - Reactions don't count toward your free message allowance.
Next steps
- Messages: reactions are part of the message object.
- Live Streaming → Reactions: the same feature, for live streams.