Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • IMMessage

Index

Properties

antiSpamInfo?: TMsgAntiSpamInfo

反垃圾相关配置

attach?: StrAnyObj

附加消息

像是 file,geo 类型的消息,文本内容为空,在附加消息里会存在一个对象代表其内容

body: string

消息的文本内容

callbackExt?: string

服务器第三方回调的扩展字段

ext?: string

扩展字段

feature: "default" | "leave" | "roam"

通知属性

flow: "in" | "out"

消息的流向

in 表示此消息是收到的消息 out 表示此消息是发出的消息

from: string

消息发送方, 帐号

fromClientType?: "Android" | "iOS" | "PC" | "WindowsPhone" | "Web" | "Server" | "Mac"

发送方的设备类型

fromDeviceId?: string

发送端设备id

fromNick?: string

消息发送方的昵称

idClient: string

sdk 端测唯一标识,可做主键使用

idServer?: string

消息服务器测的标识

它并不一定存在,故而这条消息的唯一标识请选用 idClient

pushInfo?: TMsgPushInfo

推送相关配置

scene: "p2p" | "team" | "superTeam"

场景(会话类型)

sessionId: string

消息所属的会话的ID

setting?: TMsgSetting

消息的杂项设置

status: "unread" | "read" | "deleted" | "sending" | "sendFailed" | "sent" | "receipt" | "refused"

消息状态

发送消息状态

  • sending: 发送中
  • sent: 发送成功
  • receipt: 发送成功且对方发送了已读回执
  • deleted: 已删除
  • sendFailed: 发送失败

接收消息状态

  • unread: 收到对方发送的消息,消息未读
  • read: 收到对方发送的消息,消息已读
  • deleted: 已删除
subType?: number

开发者自定义的消息子类型,格式为大于0的整数

target: string

聊天对象, 账号或者群id

teamSpecializationInfo?: TMsgTeamSpecializationInfo

群组特化的杂项配置

threadMessageInfo?: TMsgThreadMsgInfo

thread 消息的相关字段。假设消息的回复关系如下: 消息A <- 消息B <- 消息C

则:消息C 的 replyMsg 是消息B,消息C 的 threadMsg 是消息A

time: number

消息发送成功的时间戳(单位毫秒)

to: string

消息接收方, 帐号或群id

type: "text" | "image" | "audio" | "video" | "geo" | "notification" | "file" | "tip" | "robot" | "g2" | "custom"

消息类型

userUpdateTime: number

用户最后更新时间