updateChatroomInfo method

Future<NIMResult<void>> updateChatroomInfo({
  1. required String roomId,
  2. required NIMChatroomUpdateRequest request,
  3. bool needNotify = true,
  4. Map<String, Object>? notifyExtension,
})

更新聊天室信息。只有创建者和管理员拥有权限修改聊天室信息。 可以设置修改是否通知,若设置通知,聊天室内会收到类型为 NIMChatroomNotificationTypes.chatRoomInfoUpdated 的消息。

  • roomId 聊天室id
  • request 可更新的聊天室信息
  • needNotify 是否通知
  • notifyExtension 更新聊天室信息操作的扩展字段,这个字段会放到更新聊天室信息通知消息的扩展字段中

Implementation

Future<NIMResult<void>> updateChatroomInfo({
  required String roomId,
  required NIMChatroomUpdateRequest request,
  bool needNotify = true,
  Map<String, Object>? notifyExtension,
}) {
  return _platform.updateChatroomInfo(
    roomId: roomId,
    request: request,
    needNotify: needNotify,
    notifyExtension: notifyExtension,
  );
}