markAsRead

abstract fun markAsRead(spaceId: String, messageId: String? = null, handler: CompletionHandler<Void>? = null)

Mark messages sent before the specified message in the space as read, including the specified message. When messageId is null, the operation is immediately applied on the local message cache, the actual network request for the operation happens asynchronously in the background. (In case of any network failures, the conversation read status may not be updated.)

Since

2.3.0

Parameters

spaceId

the id of space. (Derived parameter: Use SpaceClient.list to get a list of spaces. Then use Space.id to retrieve the spaceId)

messageId

the id of a message. If this value is null, then mark all messages in the space read. (Derived parameter: Use MessageClient.list to get a list of messages. Then use Message.id to retrieve the messageId)

handler

an instance of CompletionHandler (OPTIONAL).