removeChatRoomEntries static method

Future<void> removeChatRoomEntries(
  1. String chatRoomId,
  2. List<String> chatRoomEntryList,
  3. bool force,
  4. dynamic finished(
    1. int code,
    2. Map<String, int>? errors
    ),
)

批量删除聊天室自定义属性 chatRoomId 聊天室 ID chatRoomEntryList 聊天室属性 1. chatRoomEntryMap集合大小最大限制为 10,超过限制返回错误码 23429 2. key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符 value 聊天室属性对应的值,最大长度 4096 个字符 force 是否强制覆盖 finished 设置聊天室属性的回调 当 code 为 23428 的时候,errors 才会有值(key标识设置失败的 key,value 标识该 key 对应的错误码)

Implementation

static Future<void> removeChatRoomEntries(
  String chatRoomId,
  List<String> chatRoomEntryList,
  bool force,
  Function(int code, Map<String, int>? errors) finished,
) async {
  Map arguments = {
    "chatRoomId": chatRoomId,
    "chatRoomEntryList": chatRoomEntryList,
    "force": force,
  };
  Map<String, dynamic>? result = await _channel.invokeMapMethod(RCMethodKey.RemoveChatRoomEntries, arguments);
  if (result != null) {
    int code = result['code'];
    Map<dynamic, dynamic>? errors = result['errors'];
    if (errors != null) {
      finished(code, Map<String, int>.from(errors));
    } else {
      finished(code, null);
    }
  } else {
    finished(-1, null);
  }
}