ChatMessage.createCombineSendMessage constructor

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

Creates a combined message for sending.

Param targetId The message recipient. The field setting is determined by the conversation type:

  • For a one-to-one chat, it is the user ID of the peer user.
  • For a group chat, it is the group ID.
  • For a chat room, it is the chat room ID.

Param title The title of the combined message.

Param summary The summary of the combined message.

Param compatibleText The compatible text of the combined message.

Param msgIds The list of original messages included in the combined message.

Param chatType The chat type, which is one-to-one chat by default. For group chat or chat room, see ChatType.

Return The message instance.

Implementation

ChatMessage.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: CombineMessageBody(
            title: title,
            summary: summary,
            compatibleText: compatibleText,
            messageList: msgIds,
          ));