sendMergerMessage method Null safety

  1. @Deprecated('sendMergerMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createMergerMessage to create a message, and then call sendMessage to send the message')
Future<V2TimValueCallback<V2TimMessage>> sendMergerMessage(
  1. {required List<String> msgIDList,
  2. required String title,
  3. required List<String> abstractList,
  4. required String compatibleText,
  5. required String receiver,
  6. required String groupID,
  7. MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  8. bool onlineUserOnly = false,
  9. bool isExcludedFromUnreadCount = false,
  10. OfflinePushInfo? offlinePushInfo,
  11. List<String>? webMessageInstanceList}
)
@Deprecated('sendMergerMessage has been deprecated since 3.6.0, we separate the creation of the message from the sending of the message, please use createMergerMessage to create a message, and then call sendMessage to send the message')

Combined message

Usually when we receive a combined message, the chat screen will look like this:

| Chat History of Vinson and Lynx | - Title

| Vinson: When is the new version of SDK scheduled to go online? | - abstract1 (Digest information 1)

| Lynx: Next Monday. The specific time depends on the system test result in these two days. | - abstract2 (Digest information 2)

| Vinson: OK | - abstract3 (Digest information 3)

The chat UI usually displays only the title and digest information of the combined message, and the complete combined message list will be displayed only when the user clicks the combined message on the UI.

You can create a combined message (V2TIMMessage) for multiple messages to be forwarded and call the sendMessage API to send the combined message. The procedure is as follows:

  1. Call createMergerMessage to create a combined message V2TIMMessage.

  2. Call sendMessage to send the forward message V2TIMMessage.

The procedure for parsing a combined message received is as follows:

  1. Obtain mergerElem via V2TIMMessage.

  2. Obtain title and abstractList via mergerElem for UI display.

  3. When a user clicks the digest information on the UI, call downloadMessageList to get the list of forwarded messages.

Note
The webMessageInstanceList field must be passed in when using on the web side. The message instance returned on the web side will contain this field

Implementation

@Deprecated(
 'sendMergerMessage has been deprecated since 3.6.0, we separate the creation and sending of messages, please use createMergerMessage to create a message, and then call sendMessage to send a message')
Future<V2TimValueCallback<V2TimMessage> ;> sendMergerMessage(
 {required List<String> msgIDList,
 required String title,
 required List<String> abstractList,
 required String compatibleText,
 required String receiver,
 required String groupID,
 MessagePriorityEnum priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
 bool onlineUserOnly = false,
 bool isExcludedFromUnreadCount = false,
 OfflinePushInfo? offlinePushInfo,
 List<String>? webMessageInstanceList}) async {
 return await ImFlutterPlatform.instance.sendMergerMessage(
 msgIDList: msgIDList,
 title: title,
 abstractList: abstractList,
 compatibleText: compatibleText,
 receiver: receiver,
 groupID: groupID,
 priority: EnumUtils.convertMessagePriorityEnum(priority),
 onlineUserOnly: onlineUse rOnly,
 isExcludedFromUnreadCount: isExcludedFromUnreadCount,
 offlinePushInfo: offlinePushInfo?.toJson(),
 webMessageInstanceList: webMessageInstanceList);
}