sendReadReceiptResponse static method
发送阅读回执
conversationType
会话类型,参见枚举 RCConversationType
targetId
会话 id
messageList
已经阅读了的消息列表
finished
回调结果,code 为 0 代表操作成功,其他值代表失败
此接口只支持群组
Implementation
static Future<void> sendReadReceiptResponse(int conversationType, String targetId, List messageList, Function(int? code)? finished) async {
List messageMaps = [];
for (Message message in messageList) {
Map messageMap = MessageFactory.instance!.message2Map(message);
messageMaps.add(messageMap);
}
Map map = {"conversationType": conversationType, "targetId": targetId, "messageMapList": messageMaps};
Map result = await _channel.invokeMethod(RCMethodKey.SendReadReceiptResponse, map);
int? code = result["code"];
if (finished != null) {
finished(code);
}
}