Unread Message count for Group Channel

How to make unread message count as 0 if any one of the group member reads the chat in group channel.

Lets say we created a channel with 4 members, if person A reads message we need to make for others also unread message count as 0. As person A read and took action on the chat, so for other members we have to make no unread messages. How we can achieve this?

Hi @Deepa_Test,

The mark as read API works for a single user, so you will have to call the API for each user in the group.

@taha.saghir Thanks for the update, Can you please share the code reference for the same?

@taha.saghir Any update on this?

Hi @Development_Account - sorry for missing your message earlier.

We do not have sample code for Platform API, as it could have vast use cases and the code would depend on the language (server-side) that is being used to call the API.

That said, one of the possible solution is:

When a user views a channel from the UI, check if the read_receipt timestamp of any user is less than the last_message / created_at timestamp - if so, call the mark as read API iteratively with the user_id of all of those users.

Alternatively, you can use the message read webhook.