setMessageExtensions method

  1. @override
Future<V2TimValueCallback<List<V2TimMessageExtensionResult>>> setMessageExtensions({
  1. required String msgID,
  2. required List<V2TimMessageExtension> extensions,
})
override

Implementation

@override
Future<V2TimValueCallback<List<V2TimMessageExtensionResult>>> setMessageExtensions({
  required String msgID,
  required List<V2TimMessageExtension> extensions,
}) async {
  return V2TimValueCallback<List<V2TimMessageExtensionResult>>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "setMessageExtensions",
        buildMessageMangerParam(
          {
            "msgID": msgID,
            "extensions": extensions
                .map(
                  (e) => Map.from(
                    {
                      "key": e.extensionKey,
                      "value": e.extensionValue,
                    },
                  ),
                )
                .toList(),
          },
        ),
      ),
    ),
  );
}