sendGroupMessageReadAck method
Sends the group message receipt to the server.
Note
- This method takes effect only after you set ChatOptions.requireAck and ChatMessage.needGroupAck as
true. - This method applies to group messages only. To send a one-to-one chat message receipt, call sendMessageReadAck; to send a conversation receipt, call sendConversationReadAck.
Param msgId The message ID.
Param groupId The group ID.
Param content The extension information, which is a custom keyword that specifies a custom action or command.
Throws A description of the exception. See ChatError.
Implementation
Future<void> sendGroupMessageReadAck(
String msgId,
String groupId, {
String? content,
}) async {
try {
Map req = {
"msgId": msgId,
"group_id": groupId,
};
req.putIfNotNull("content", content);
Map result = await platform_interface.Client.instance.chatManager
.callNativeMethod(ChatMethodKeys.ackGroupMessageRead, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}