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.
Hi Tyler, Thanks for the update, I have to ask one more question.
Let’s take one scenerio, where we are doing message threading. In one group chat, there are 5 messages on which message threading have been done. But one user only open two of the message threading, then will we get the message read webhook events.
If yes → what about the other 3 message read where user haven’t open the message and didn’t read those message.
If No → what about the read status of 2 messages, will it not marked as read for that user