removeChatRoomEntry static method

Future<void> removeChatRoomEntry(
  1. String chatRoomId,
  2. String key,
  3. bool sendNotification,
  4. String notificationExtra,
  5. dynamic finished(
    1. int? code
    )?,
)

删除聊天室自定义属性

chatroomId 聊天室 Id

key 聊天室属性名称

sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage 通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)

notificationExtra 通知的自定义字段,RC:chrmKVNotiMsg ������消息中会包含此字段,最大长度 2 kb

finished 回调结果,code 为 0 代表操作成功,其他值代表失败 此接口只支持聊天室,必须先开通聊天室属性自定义功能

Implementation

static Future<void> removeChatRoomEntry(String chatRoomId, String key, bool sendNotification, String notificationExtra, Function(int? code)? finished) async {
  Map map = {"chatRoomId": chatRoomId, "key": key, "sendNotification": sendNotification, "notificationExtra": notificationExtra};
  int? result = await _channel.invokeMethod(RCMethodKey.RemoveChatRoomEntry, map);
  if (finished != null) {
    finished(result);
  }
}