sendConversationReadAck method Null safety
- 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 {@link EMChatManagerListener#onConversationRead(String, String)} 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 {@link EMError}.
Implementation
Future<bool> sendConversationReadAck(String conversationId) async {
Map req = {"con_id": conversationId};
Map result = await EMMethodChannel.ChatManager.invokeMethod(
ChatMethodKeys.ackConversationRead, req);
try {
EMError.hasErrorFromResult(result);
return result.boolValue(ChatMethodKeys.ackConversationRead);
} on EMError catch (e) {
throw e;
}
}