Message_id not in group_channel:message_read?

Hello,

I am working with sendbird web hooks in group_channels. When I receive the group_channel:message_send event. The payload includes a message_id in the payload (as seen in the docs here: https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks#2-group_channel-message_send). But on the group_channel:message_read there is no message_id. (https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks#2-group_channel-message_read) This makes no sense to me. I have no way to identify which message has been read.Am I missing something? I need a way to identify which message has been read from the web hook. Any help would be appriciated.

Thanks

@fnardone,

First off, welcome to the Sendbird community, we’re excited to have you here!
In regards to your question, maybe it would help to understand your use case for the webhooks.
When we determine unread messages, we don’t explicitly track track which messages have been read. We take a look at the channel, and utilize timestamps to determine which messages have been read.

Lets use the below as an example:
Two messages sent to a channel.

  • Message A was sent at 1612757704000
  • Message B was sent at 1612815304000

If a user’s last read timestamp is 1612797304000, then Message A would be considered read, while Message B would be considered unread.

Looking at what the webhook provides in its payload, we get a read_ts attribute which contains the timestamp of the users current place in the channel.

Using this timestamp, you can determine which messages have been read and which have been not.

Let me know if you have any additional questions.

Thanks,
Tyler