clearMessages static method
清空指定类型,targetId 的某一会话所有聊天消息记录
Implementation
static Future<void> clearMessages(int? conversationType, String? targetId, Function(int? code)? finished) async {
if (conversationType == null || targetId == null) {
developer.log("clearMessages fail: conversationType or targetId or content is null", name: "RongIMClient");
return null;
}
Map paramMap = {
"conversationType": conversationType,
"targetId": targetId,
};
int? result = await _channel.invokeMethod(RCMethodKey.ClearMessages, paramMap);
if (finished != null) {
finished(result);
}
}