合并消息对象。

interface CombineMessage {
    msgServerId: string;
    msgLocalId: string;
    from: string;
    to: string;
    sender: Sender;
    conversationId: string;
    conversationType: "singleChat" | "groupChat" | "chatRoom";
    sendStatus: MessageSendStatus;
    ext: Record<string, unknown>;
    timestamp: number;
    direct?: MessageDirect;
    isOnline?: boolean;
    receiverList?: string[];
    deliverOnlineOnly?: boolean;
    webhookEnv?: string;
    priority?: MessagePriority;
    isBroadcast?: boolean;
    isContentReplaced?: boolean;
    combineLevel?: number;
    stream?: StreamMessageMeta;
    reactions?: MessageReaction[];
    groupReadCount?: number;
    isPeerRead?: boolean;
    needReadReceipt?: boolean;
    isChatThread?: boolean;
    chatThread?: ChatThreadMessageContext;
    chatThreadOverview?: ChatThreadOverview;
    modifiedInfo?: MessageModifiedInfo;
    type: "combine";
    body: CombineMessageBody;
}

Hierarchy (View Summary)

Properties

msgServerId: string

服务端消息 ID。

msgLocalId: string

本地消息 ID。

from: string

发送方标识。自己其他设备发给当前设备时为 当前用户ID/来源设备ID,其他场景为用户 ID。

to: string

接收方标识:指定当前用户的其他设备时为 当前用户ID/目标设备ID,普通单聊为用户 ID,群聊为群组 ID,聊天室为聊天室 ID。

sender: Sender

发送者资料摘要。

conversationId: string

会话 ID;当前用户设备间单聊使用 当前用户ID/对端设备ID

conversationType: "singleChat" | "groupChat" | "chatRoom"

会话类型。

sendStatus: MessageSendStatus

消息发送状态;sent 表示服务端已接受消息,不表示对端已读。

ext: Record<string, unknown>

消息扩展字段。

timestamp: number

消息时间戳,单位毫秒。

direct?: MessageDirect

消息方向。

isOnline?: boolean

是否为在线消息;false 表示离线消息。

receiverList?: string[]

群聊或聊天室定向消息的接收者列表。

deliverOnlineOnly?: boolean

是否仅投递给在线用户。

webhookEnv?: string

发送消息协议中的 webhookEnv 字段。

priority?: MessagePriority

消息优先级。

isBroadcast?: boolean

是否为广播消息,主要用于聊天室下行场景。

isContentReplaced?: boolean

内容是否被审核替换。

combineLevel?: number

合并消息层级,仅 type=combine 时有意义。

流式消息元信息,仅流式消息回调场景提供。

reactions?: MessageReaction[]

消息的表情回应列表。

groupReadCount?: number

群消息已读人数。

isPeerRead?: boolean

单聊发送消息是否已被对端阅读;仅发送方单聊消息有意义,undefined 表示未知或不适用。

needReadReceipt?: boolean

是否需要消息已读回执。

isChatThread?: boolean

是否为 Thread 回复消息。

Thread 消息上下文;接收 Thread 回复消息时返回。

chatThreadOverview?: ChatThreadOverview

Thread 概览;父群消息携带 Thread 概览时返回。

modifiedInfo?: MessageModifiedInfo

消息修改信息;消息被编辑后返回或下发。

type: "combine"

固定为合并消息类型。

合并消息体。