Set Chat Markers
Set chat markers to track message read status.
Read time 1 minuteLast updated 7 months ago
The Chat Markers API gives you control over the creation of Chat Markers. You can use Chat Markers to mark messages as read. It also provides data for the Conversation list API. This functionality works in both channels and direct messages.
To set a conversation's read marker, sign in to the application and use .
A input is used by the method to determine which type of conversation it belongs to and the of the message to set as read.
This method sets a read checkpoint for the relevant conversation at the of the provided.
VivoxService.Instance.SetMessageAsReadAsync()VivoxMessageMessageIdMessageIdVivoxMessageThe following code is an example of how to set a Chat Marker.
DateTime seenAt = DateTime.Now; // Optional timestamp for when the message was seen. Default is DateTime.Now converted to UTC.var readMessage = await VivoxService.Instance.SetMessageAsReadAsync(message, seenAt);
A with its property set to true is returned upon completion. Note that DateTime is server side time and not client side time.
VivoxMessageIsReadSince a instance canont be created manually, the input for needs to come from one of the events or methods in the SDK that provides a to the client.
These are some examples of events and methods that provide instances that can be used as input for :
VivoxMessageVivoxService.Instance.SetMessageAsReadAsync()VivoxMessageVivoxMessageVivoxService.Instance.SetMessageAsReadAsync()// EventsChannelMessageReceived;ChannelMessageEdited;ChannelMessageDeleted;DirectedMessageReceived;DirectedMessageDeleted;DirectedMessageEdited;
// MethodsGetChannelTextMessageHistoryAsync();GetDirectTextMessageHistoryAsync();