Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAReceivedMessage

用户收到的消息结构

Hierarchy

  • IAReceivedMessage

Index

Properties

messageType

messageType: string

消息类型

example

RC:TxtMsg

content

content: any

消息内容

senderUserId

senderUserId: string

消息发送者的用户 id

targetId

targetId: string

会话 id

channelId

channelId: string

会话的业务标识

conversationType

conversationType: ConversationType

会话类型

  • 1: 单聊
  • 3: 群聊
  • 4: 聊天室
  • 5: 客服会话
  • 6: 系统消息
  • 7: 默认关注的公众号
  • 8: 手动关注的公众号
  • 9: RTCLib 房间

sentTime

sentTime: number

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

receivedTime

receivedTime: number

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

description

当 isOffLineMessage 为 true 时,该值无效

messageUId

messageUId: string

服务端存储的消息 Id

messageDirection

messageDirection: MessageDirection

消息方向

  • 1: 发送
  • 2: 接收

isPersited

isPersited: boolean

是否存储

defaultvalue

true

isCounted

isCounted: boolean

是否计数

defaultvalue

true

isOffLineMessage

isOffLineMessage: boolean

是否为离线消息, 在超级群会话中不适用

Optional isMentioned

isMentioned?: boolean

是否为 @ 消息

Optional disableNotification

disableNotification?: boolean

消息是否静默

description

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

Optional isStatusMessage

isStatusMessage?: boolean

是否是状态消息

canIncludeExpansion

canIncludeExpansion: boolean

是否支持消息扩展

Optional expansion

expansion?: null | {}

消息扩展

receivedStatus

receivedStatus: ReceivedStatus

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

deprecated

Optional receivedStatusInfo

receivedStatusInfo?: IReceivedStatusInfo

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

Optional sentStatus

sentStatus?: SentStatus

消息的发送状态,Electron 平台可由 SDK 内自动更新和用户设置, web 端仅支持 SDK 内更新为 发送中、已发送和发送失败

Optional readReceiptInfo

群已读回执信息(V1 版本为 IReadReceiptResponseInfo, V4 版本为 IReadReceiptInfo)

Optional pushConfig

pushConfig?: IPushConfig

推送扩展

Optional messageId

messageId?: number

消息本地 ID,Electron 平台独有字段

Optional isInterrupt

isInterrupt?: boolean

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

Optional isModifyMessage

isModifyMessage?: boolean

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

Optional channelType

channelType?: UltraGroupChannelType

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

Optional directedUserIds

directedUserIds?: string[]

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