RongIMLib View Markdown
    Preparing search index...

    Interface IReceivedConversationByTag

    interface IReceivedConversationByTag {
        conversationType: ConversationType;
        targetId: string;
        channelId?: string;
        latestMessage: IReceivedMessage<any> | null;
        unreadMessageCount?: number;
        hasMentioned?: boolean;
        mentionedInfo?: MentionedInfo;
        lastUnreadTime?: number;
        notificationStatus?: NotificationStatus;
        notificationLevel?: NotificationLevel;
        isTop?: boolean;
        translateStrategy?: TranslateStrategy;
        versionTime?: number;
        matchCount?: number;
        unreadMentionedCount?: number;
        unreadMentionedMeCount?: number;
        operationTime?: number;
        draft?: string;
        channelType?: UltraGroupChannelType;
        firstUnreadMessage?: IUltraUnreadMsg | null;
        editedMessageDraft?: IEditedMessageDraft;
        includeRobot?: boolean;
        dataMgmtInfo?: IDataManagementInfo;
        isTopInTag: boolean;
    }

    Hierarchy

    Index
    conversationType: ConversationType

    会话类型

    targetId: string

    会话 Id

    • 当 conversationType 为 ConversationType.GROUP 或 ConversationType.ULTRA_GROUP 时,该值为群组 Id
    • 当 conversationType 为 ConversationType.PRIVATE 时,该值为对方用户 Id
    channelId?: string

    会话的业务标识

    • 当会话类型为超级群时,该值为频道 ID
    • 当会话类型为单、群聊时,该值为组织 ID,用于区分多组织场景
    • 其他会话类型该值为空
    latestMessage: IReceivedMessage<any> | null

    会话中的最后一条消息

    unreadMessageCount?: number

    当前会话的未读消息数

    hasMentioned?: boolean

    未读消息中是否包含 @ 自己、@ 所有人的消息

    mentionedInfo?: MentionedInfo

    消息中的 @ 数据,仅在 conversationType 为 ConversationType.GROUP 或 ConversationType.ULTRA_GROUP 时有效。

    • 仅支持 Web 端;该数据基于本地接收到的消息计算得出,服务器不记录
    • 仅支持群聊会话,自 5.20.0 版本开始,支持超级群会话类型
    lastUnreadTime?: number

    废弃,该字段为内部记录,用于接收消息时避免本地计数重复

    • 本地收消息时,避免重新收消息导致技术重复
    • 本地撤回消息时,计算是否需要本地计数 -1
    notificationStatus?: NotificationStatus

    会话免打扰状态

    1. 已开启免打扰
    2. 未开启免打扰
    notificationLevel?: NotificationLevel

    会话免打扰状态

    isTop?: boolean

    会话是否已置顶

    translateStrategy?: TranslateStrategy

    会话翻译策略

    5.24.0

    versionTime?: number

    会话项变更时间戳

    字段已废弃即将删除,请勿使用

    matchCount?: number

    按消息搜索会话时,匹配到的消息数量(仅 Electron 平台相关搜索接口返回值有效)

    unreadMentionedCount?: number

    会话的 @ 消息未读数

    5.7.9

    • 该属性仅 Web 端有效;Electron 平台可通过 getUnreadMentionedMessages 接口获取未读 @ 消息列表计算
    • 该属性仅超级群会话有效,数据基于服务器记录,并依据接收到的消息进行本地维护
    • 自 5.20.0 版本开始,新增支持单群聊会话,数据基于本地接收到的消息计算得出,服务器不记录
    unreadMentionedMeCount?: number

    @ 我的未读消息数

    5.7.9

    • 该属性仅 Web 端有效;Electron 平台可通过 getUnreadMentionedMessages 接口获取未读 @ 消息列表计算
    • 该属性仅超级群会话有效,数据基于服务器记录,并依据接收到的消息进行本地维护
    • 自 5.20.0 版本开始,新增支持单群聊会话,数据基于本地接收到的消息计算得出,服务器不记录
    operationTime?: number

    会话操作时间

    • 5.8.4 版本开始,Electron 平台支持此参数,收发消息、设置置顶等操作将更新会话操作时间以用于会话排序。
    • 5.14.0 版本开始 Web 端支持此参数,仅收发消息时会更新。
    • 5.20.0 版本开始,Web 端增加内存状态维护,不再只有从服务器获取列表时返回。

    5.8.4

    draft?: string

    会话草稿

    channelType?: UltraGroupChannelType

    超级群频道类型,仅超级群会话支持

    firstUnreadMessage?: IUltraUnreadMsg | null

    第一条未读消息

    • 该属性仅超级群会话支持,数据基于服务器记录,并依据接收到的消息进行本地维护
    • 自 5.20.0 版本开始,新增支持单群聊会话,数据基于本地接收到的消息计算得出,并在本地缓存和维护,服务器不记录
    editedMessageDraft?: IEditedMessageDraft

    会话消息编辑草稿,仅支持 Electron 平台

    5.28.0

    includeRobot?: boolean

    是否包含机器人,当前仅支持单聊、系统会话。

    5.30.0

    dataMgmtInfo?: IDataManagementInfo

    托管数据

    • 该属性仅 Electron 平台有效,且需要用户开通用户信息托管或群组信息托管功能。
    • 该属性仅为客户端本地缓存数据,若本地缓存数据不存在,则该属性内的各字段为空。
    • 该属性仅支持单聊、群聊和系统会话。

    5.36.0

    isTopInTag: boolean

    是否为标签内置顶会话