removeChatRoomAdmin method

Future<void> removeChatRoomAdmin(
  1. String roomId,
  2. String admin
)

~english Removes privileges of a chat room admin.

Param roomId The chat room ID.

Param admin The ID of admin whose privileges are to be removed.

Throws A description of the exception. See ChatError. ~end

~chinese 移除聊天室管理员权限。

Param roomId 聊天室 ID。

Param admin 要移除管理员权限的 ID。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end

Implementation

Future<void> removeChatRoomAdmin(
  String roomId,
  String admin,
) async {
  Map req = {"roomId": roomId, "admin": admin};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.removeChatRoomAdmin, req);
  try {
    ChatError.hasErrorFromResult(result);
  } on ChatError catch (e) {
    throw e;
  }
}