createMergerMessage method Null safety
Create merge message Parameters:
messageList Message list (maximum support 300, the message object must be V2TIM_MSG_STATUS_SEND_SUCC status, the message type cannot be V2TIMGroupTipsElem)
title The source of the merged message, such as "vinson and lynx chat records", "xxx group chat chat history".
abstractList The summary list of merged messages (up to 5 abstracts are supported, and the maximum length of each abstract does not exceed 100 characters), different message types can be set with different abstract information, for example: text messages can be set to: sender: text, picture message can be set to: sender:[picture], file message can be set to: sender:[file].
compatibleText Compatible text for merged messages. If the lower version SDK does not support merged messages, a text message will be received by default. The content of the text message is compatibleText, and this parameter cannot be null.
Remark:
Multiple forwarded messages can be created into a merged message V2TIMMessage, and then call the sendMessage interface to send. The implementation steps are as follows:
1. Call createMergerMessage to create a merged message V2TIMMessage.
2. Call sendMessage to send the forwarding message V2TIMMessage.
The steps of parsing the received merger message:
1. Obtain mergerElem through V2TIMMessage.
2. Obtain title and abstractList UI display through mergerElem.
3. When the user clicks the summary information UI, call the downloadMessageList interface to get the list of forwarding messages.
Implementation
Future<V2TimValueCallback<V2TimMsgCreateInfoResult>> createMergerMessage({
required List<String> msgIDList,
required String title,
required List<String> abstractList,
required String compatibleText,
}) async {
return ImFlutterPlatform.instance.createMergerMessage(
msgIDList: msgIDList,
title: title,
abstractList: abstractList,
compatibleText: compatibleText);
}