Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Home
/
Chat
/
iOS
/
User
This is the new Docs for Chat SDK v4 for iOS. To see the previous Docs, click here.

Retrieve members who have read a message

Using the getReadMembers(message:includeAllMembers:) method, you can view members who have read a specific message in a group channel. The method returns a list of channel members who have read the message by comparing the message’s creation time and the channel members’ read receipt. The list will exclude the current user and the message sender.

Note: Read receipt indicates the timestamp of the latest time when each user has read messages in the channel in Unix milliseconds.

If you want to keep track of who has read a new message, we recommend that you use the getReadMembers(message:includeAllMembers:) method in channelDidUpdateReadStatus(_:) of the channel event delegate. Then the client app will receive a callback from the Sendbird server whenever a channel member reads a message. To do so, you should pass the new message object as an argument to a parameter in the getReadMembers(message:includeAllMembers:) method through channelDidUpdateReadStatus(_:).

let readMembers = channel.getReadMembers(message: message, includeAllMembers: true)

Note: Using the getUnreadMembers(message:includeAllMembers:) method, you can also view members who haven't read a specific message in a group channel, except the current user and the message sender. In the meantime, you can get information on each channel member's read receipt through the getReadStatus(includeAllMembers:) method.