sendConversationReadAck method
- String conversationId
Sends the conversation read receipt to the server. This method is only for one-to-one chat conversations.
This method informs the server to set the unread message count of the conversation to 0. In multi-device scenarios, all the devices receive the ChatEventHandler.onConversationRead callback.
Note This method applies to one-to-one chat conversations only. To send a group message read receipt, call sendGroupMessageReadAck.
Param conversationId The conversation ID.
Throws A description of the exception. See ChatError.
Implementation
Future<void> sendConversationReadAck(String conversationId) async {
try {
Map req = {"convId": conversationId};
Map result = await platform_interface.Client.instance.chatManager
.callNativeMethod(ChatMethodKeys.ackConversationRead, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}