EMMessage.createCombineSendMessage constructor

EMMessage.createCombineSendMessage(
  1. {required String targetId,
  2. String? title,
  3. String? summary,
  4. String? compatibleText,
  5. required List<String> msgIds,
  6. ChatType chatType = ChatType.Chat}
)

创建一条待发送的合并消息。

Param targetId 消息接收方。该字段的设置取决于会话类型:

  • 单聊:对方用户 ID;
  • 群组:群组 ID;
  • 聊天室:聊天室 ID。

Param title 合并消息的标题。

Param summary 合并消息的概要。

Param compatibleText 合并消息的兼容信息。

Param msgIds 合并消息的消息 ID 列表。

Param chatType 聊天类型, 默认为单聊,如果是群聊或者聊天室,可以参考 ChatType

Return 消息体实例。

Implementation

EMMessage.createCombineSendMessage({
  required String targetId,
  String? title,
  String? summary,
  String? compatibleText,
  required List<String> msgIds,
  ChatType chatType = ChatType.Chat,
}) : this.createSendMessage(
          chatType: chatType,
          to: targetId,
          body: EMCombineMessageBody(
            title: title,
            summary: summary,
            compatibleText: compatibleText,
            messageList: msgIds,
          ));