RongIMLib View Markdown
    Preparing search index...

    Function setUltraGroupDefaultNotificationLevel

    • 设置指定超级群或频道的默认免打扰级别

      Parameters

      • options: IUltraGroupOption

        设置超级群或频道的默认免打扰级别参数,包含会话类型、目标 Id、频道 Id,类型为 IUltraGroupOption 设置超级群默认通知配置 options: { targetId: 'xxx' }, channelId 不传或传 '' 设置超级群指定频道默认通知配置 options: { targetId: 'xxx', channelId: 'xxx' }

      • notificationLevel: NotificationLevel

        免打扰级别

      Returns Promise<RCResult<void>>

      为指定的超级群设置的默认免打扰逻辑,自动适用于群下的所有频道。如果针对频道另行设置了默认免打扰逻辑,则以该频道的默认设置为准

      5.2.0 仅 Web 端 IMLib 支持超级群。

      5.3.0 以后 notificationLevel 类型为 NotificationLevel

      const options = {
      targetId: 'targetId',
      channelId: 'channelId',
      };
      const notificationLevel = RongIMLib.NotificationLevel.NOT_MESSAGE_NOTIFICATION;
      const res = await RongIMLib.setUltraGroupDefaultNotificationLevel(options, notificationLevel);
      console.log('设置指定超级群或频道的默认免打扰级别结果:', res);