changeChatRoomName method

Future<void> changeChatRoomName(
  1. String roomId,
  2. String name
)

Changes the chat room name.

Only the chat room owner can call this method.

Param roomId The chat room ID.

Param name The new name of the chat room.

Throws A description of the exception. See ChatError.

Implementation

Future<void> changeChatRoomName(
  String roomId,
  String name,
) async {
  try {
    Map req = {"roomId": roomId, "subject": name};
    Map result = await platform_interface.Client.instance.chatRoomManager
        .callNativeMethod(ChatMethodKeys.changeChatRoomSubject, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}