Read receipts

Read receipts indicate if other channel members have received and viewed a message.

Required setup

Read Receipts feature is tightly coupled with the Unread Message Count feature. To receive message read receipts, you must know which message was last read by which user on a given channel. That's why, to implement the Read Receipts feature, you must first set the timetoken of the last message a user read on a given channel. Based on that, Unity Chat SDK will map a user's last read message to a given message timetoken and let you show this mapping result in your chat app as read or unread.

Get read receipts

Get a read confirmation status for messages you published on a channel.

Not available for public chats

Read receipts are disabled in public chats. If you try implementing this feature in a public channel type, you'll get the Read receipts are not supported in Public chats error.

Event signature

Action<List<string>> OnMessageReceived;

Event handler signature

void EventHandler(Message message)
ParameterTypeRequiredDefaultDescription
messageMessageYesn/aThe message object to handle the receipt event for.

Basic Usage

Receive updates for read receipts on the support channel.

public void InitializeChatForMessages()
{
// reference the channel where you want to listen to message signals
if (chat.TryGetChannel("support", out var channel))
{
Console.WriteLine($"Found channel with name {channel.Name}");

// join the channel
channel.Join();

// subscribe to the OnReadReceiptEvent event
channel.OnReadReceiptEvent += OnReadHandler;
}
else
{
show all 29 lines
Last updated on