Skip to content

qchat_def.message_def.QChatMessage

Zvicii edited this page Jul 7, 2023 · 6 revisions

Interface: QChatMessage

qchat_def/message_def.QChatMessage

QChatMessage 接收到的完整消息体

Table of contents

Properties

Properties

server_id

Optional server_id: string

必填,消息所属的server id

Defined in

ts/qchat_def/message_def.ts:150


channel_id

Optional channel_id: string

必填,消息所属的channel id

Defined in

ts/qchat_def/message_def.ts:152


msg_type

Optional msg_type: NIMQChatMsgType

必填,消息类型

Defined in

ts/qchat_def/message_def.ts:154


msg_sub_type

Optional msg_sub_type: number

可选,消息子类型

Defined in

ts/qchat_def/message_def.ts:156


msg_body

Optional msg_body: string

可选,消息内容

Defined in

ts/qchat_def/message_def.ts:158


msg_attach

Optional msg_attach: object

可选,消息附件

Defined in

ts/qchat_def/message_def.ts:160


msg_ext

Optional msg_ext: string

可选,消息扩展字段

Defined in

ts/qchat_def/message_def.ts:162


msg_id

Optional msg_id: string

可选,消息重发时需要指定此参数

Defined in

ts/qchat_def/message_def.ts:164


resend_flag

Optional resend_flag: boolean

必填,重发标记,false:不是重发,true:是重发

Defined in

ts/qchat_def/message_def.ts:166


mention_all

Optional mention_all: boolean

可选,是否艾特所有人,false:否,true:是

Defined in

ts/qchat_def/message_def.ts:168


mention_accids

Optional mention_accids: string[]

可选,被艾特的人的accid列表

Defined in

ts/qchat_def/message_def.ts:170


mention_role_ids

Optional mention_role_ids: string[]

可选,被艾特的人的身份组id列表

Defined in

ts/qchat_def/message_def.ts:172


history_enable

Optional history_enable: boolean

必填,该消息是否存储云端历史,0:不支持,1:支持

Defined in

ts/qchat_def/message_def.ts:174


push_payload

Optional push_payload: string

可选,自定义的推送属性,限制json

Defined in

ts/qchat_def/message_def.ts:176


push_content

Optional push_content: string

可选,自定义的推送内容

Defined in

ts/qchat_def/message_def.ts:178


push_enable

Optional push_enable: boolean

可选,是否需要推送, false: 不需要, true: 需要, 默认 false

Defined in

ts/qchat_def/message_def.ts:180


need_badge

Optional need_badge: boolean

可选,是否需要消息计数, false: 不需要, true: 需要, 默认 true

Defined in

ts/qchat_def/message_def.ts:182


need_push_nick

Optional need_push_nick: boolean

可选,是否需要推送昵称, false: 不需要, true: 需要, 默认 true

Defined in

ts/qchat_def/message_def.ts:184


route_enable

Optional route_enable: boolean

可选,是否需要抄送, false: 不需要, true: 需要, 默认 true

Defined in

ts/qchat_def/message_def.ts:186


thread_info

Optional thread_info: QChatMessageThreadInfo

可选,thread 消息相关信息

Defined in

ts/qchat_def/message_def.ts:188


anti_spam_info

Optional anti_spam_info: QChatMessageAntiSpamInfo

可选,反垃圾信息

Defined in

ts/qchat_def/message_def.ts:190


env

Optional env: string

可选,环境变量

Defined in

ts/qchat_def/message_def.ts:192


status

Optional status: NIMQChatMessageStatus

消息状态

Defined in

ts/qchat_def/message_def.ts:195


msg_server_id

Optional msg_server_id: string

更新消息时必填,消息服务器端id

Defined in

ts/qchat_def/message_def.ts:197


from_accid

Optional from_accid: string

消息发送者的accid

Defined in

ts/qchat_def/message_def.ts:199


from_client_type

Optional from_client_type: number

消息发送者的客户端类型

Defined in

ts/qchat_def/message_def.ts:201


from_device_id

Optional from_device_id: string

消息发送者的设备id

Defined in

ts/qchat_def/message_def.ts:203


from_nick

Optional from_nick: string

消息发送者的昵称

Defined in

ts/qchat_def/message_def.ts:205


timestamp

Optional timestamp: number

更新消息时必填,消息创建的时间戳,以服务器返回信息为准

Defined in

ts/qchat_def/message_def.ts:207


update_timestamp

Optional update_timestamp: number

消息更新时间戳

Defined in

ts/qchat_def/message_def.ts:209


notify_reason

Optional notify_reason: NIMQChatMessageNotifyReason

消息下发原因

Defined in

ts/qchat_def/message_def.ts:211


is_anti_spamed

Optional is_anti_spamed: boolean

是否被反垃圾

Defined in

ts/qchat_def/message_def.ts:213


anti_spam_result

Optional anti_spam_result: string

反垃圾结果

Defined in

ts/qchat_def/message_def.ts:215


callback_ext

Optional callback_ext: string

可选,第三方回调扩展字段

Defined in

ts/qchat_def/message_def.ts:217


update_content

Optional update_content: QChatMessageUpdateContent

上次消息变更内容

Defined in

ts/qchat_def/message_def.ts:219


update_ope_info

Optional update_ope_info: QChatMessageUpdateOpeInfo

上次消息变更操作信息

Defined in

ts/qchat_def/message_def.ts:221

Clone this wiki locally