How to 'listen' to 'emoji reactions' that come in through the socket?

The sb.Channelhandler has a lot of options to hook to events coming in from the socket. But we do not see anything for ‘emoji reactions’. It seems like these are internally different from normal ‘message’ reactions.

Is it possible to hook into when an ‘emoji reaction’ comes in?

We would like to show in the channel list some thing like ‘User X reacted to you with an Emoji y’.

This feature is intended only for small channels: <5 users.

Hi @vibonacci,

I believe you’re looking for onReactionUpdated. It should trigger when a message has been reacted to. It will provide you with a channel object and a reaction event which contains:

messageId: 1969176265
userId: "Admin"
key: "+1"
operation: "add"
updatedAt: 1657861900358

That makes sense, but.
In our app, we’ve registered all the ChannelHandler listeners, and all of them work, except that onReactionUpdated is not triggered when other chat user adds an emoji reaction.

Can you provide me with the version of the SDK you’re using? In addition to that, can you provide me with how you’ve registered the handler and how you’re reacting to messages?

We’re using 3.1.10 of the Sendbird JavaScript SDK

Registering listener:

image

const channelHandler = new sb.ChannelHandler();
channelHandler.onReactionUpdated = function (channel, event) {
  console.log('[Socket IN] -> onReactionUpdated channel', channel);
  console.log('[Socket IN] -> onReactionUpdated event', event);
};
sb.addChannelHandler(randomUuid(), channelHandler);

But really don’t believe registering the listener is the issue. All other listeners work fine.

We’re ‘reacting’ to messages using the JS UIKit. It appears to make a socket out, as well as a normal POST API call.

I’ll try and reproduce this behavior with 3.1.10. I tested with with the V4 SDK and didn’t have an issue.