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.

const FChannelProperties Properties{TEXT("channel-type"), TEXT("channel-id")};
Client->WatchChannel(
  Properties,
  [](UChatChannel* Channel)
  {
    // ReadState is the list of read states for each user on the channel
    const TArray<FRead>& ReadState = Channel->State.Read;
  });

Unread Messages Per Channel

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

Channel->State.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:

Client->MarkAllRead();
© Getstream.io, Inc. All Rights Reserved.