Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAReceivedMessage

用户收到的消息结构

Hierarchy

  • Omit<IReceivedMessage, "channelId" | "isMentioned" | "disableNotification" | "isStatusMessage" | "expansion">
    • IAReceivedMessage

Index

Properties

conversationType: ConversationType

会话类型

targetId: string

会话 targetId

senderUserId: string

消息发送者的用户 Id

content: any

消息内容

messageType: string

消息结构名称,即消息类型

messageUId: string

服务端存储的消息 Id

messageDirection: MessageDirection

消息方向

  • 1: 发送
  • 2: 接收
isOffLineMessage: boolean

是否为离线消息,不适用于超级群消息

sentTime: number

消息在服务器端的发送时间

receivedTime: number

消息接收时间,该时间通过消息的 sentTime 值在本地进行计算得出,不推荐使用

description

当 isOffLineMessage 为 true 时,该值无效

isPersited: boolean

是否存储

defaultvalue

true

isCounted: boolean

是否计数

defaultvalue

true

canIncludeExpansion: boolean

是否支持消息扩展存储

receivedStatus: ReceivedStatus

消息接收状态 只能表示单一状态,推荐使用 receivedStatusInfo 来判断接收消息状态

deprecated
receivedStatusInfo?: IReceivedStatusInfo

消息接收状态详情 推荐使用,receivedStatusInfo 值更详细,能同时表示多个接收状态

messageId?: number

消息本地 ID, web 端由 lib 内生成,PC 端由协议栈数据库生成自增 ID

sentStatus?: SentStatus

消息发送状态,web 端由 lib 内根据消息状态设置值为 发送中、已发送和发送失败,PC 端由协议栈自动维护或用户自己设置

群已读回执信息

  • 导航配置 grpRRVer = 0 时为 IReadReceiptResponseInfo,
  • 导航配置 grpRRVer >= 1 时为 IReadReceiptInfo
pushConfig?: IPushConfig

推送扩展

isInterrupt?: boolean

超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息

isModifyMessage?: boolean

拉取历史消息时表示该消息是否修改过(仅超级群有效)

channelType?: UltraGroupChannelType

拉取历史消息时表示该消息是否为超级群频道类型(仅超级群有效)

hasMore?: boolean

是否断档

directedUserIds?: string[]

定向用户列表 (仅支持群聊,超级群)

disableUpdateLastMessage?: boolean

禁止更新到会话最新一条消息,默认 false: 更新,true: 不更新

needReceipt?: boolean

是否需要回执,仅支持单群聊会话类型内有效

since

5.20.0

sendReceipt?: boolean

是否已发送回执,仅获取历史消息列表时有效;仅单群聊会话类型内有效

since

5.20.0

channelId: string

会话的业务标识

isMentioned?: boolean

是否为 @ 消息

disableNotification?: boolean

消息是否静默

description

静默消息不会发送 Push 信息和本地通知提醒

isStatusMessage?: boolean

是否是状态消息

expansion?: null | {}

消息扩展