RongIMLib View Markdown
    Preparing search index...

    Function getTotalUnreadMentionedCountByLevels

    • 获取会话指定免打扰级别未读 @ 消息数

      Parameters

      Returns Promise<RCResult<number>>

      返回一个 RCResult 类型 Promise,data 中返回会话未读数

      查找免打扰配置符合传入的免打扰级别的会话,返回所有会话中所有未读 @ 消息的总数

      5.5.1 暂不支持 Electron 平台

      获取会话指定免打扰级别未读 @ 消息数示例:

      const conversationTypes = [RongIMLib.ConversationType.PRIVATE];
      const levels = [RongIMLib.NotificationLevel.ALL_MESSAGE];
      const totalUnreadCount = await RongIMLib.getTotalUnreadMentionedCountByLevels(conversationTypes, levels);
      console.info('获取会话指定免打扰级别未读 @ 消息数结果:', totalUnreadCount);