changeOwner method
转移聊天室的所有权。
仅聊天室所有者可调用此方法。
Param roomId 聊天室 ID。
Param newOwner 新的聊天室所有者 ID。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。
Implementation
Future<void> changeOwner(
String roomId,
String newOwner,
) async {
try {
Map req = {"roomId": roomId, "newOwner": newOwner};
Map result = await platform_interface.Client.instance.chatRoomManager
.callNativeMethod(ChatMethodKeys.changeChatRoomOwner, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}