Channels

When you retrieve a channel from the API (e.g. using query channels), the read state for all members is included in the response. This allows you to display which messages are read by each user. For each member, we include the last time he or she marked the channel as read.

final response = await channel.watch();

// readState is the list of read states for each user on the channel
List<Read> readState = response.read;

Unread Messages Per Channel

You can retrieve the count of unread messages for the current user on a channel like this:

channel.unreadCount();

Unread Mentions Per Channel

You can retrieve the count of unread messages mentioning the current user on a channel like this:

channel.countUnreadMentions();

Mark All As Read

You can mark all channels as read for a user like this:

await client.markRead();
© Getstream.io, Inc. All Rights Reserved.