sendCustomMessage method

Future<String> sendCustomMessage({
  1. String? toUserId,
  2. String? groupId,
  3. required String data,
  4. String customExtension = '',
  5. String description = '',
})

Implementation

Future<String> sendCustomMessage({
  String? toUserId,
  String? groupId,
  required String data,
  String customExtension = '',
  String description = '',
}) async {
  return _call('sendCustomMessage', () async {
    final msg = await OpenIM.iMManager.messageManager.createCustomMessage(
      data: data,
      extension: customExtension,
      description: description,
    );
    return _sendCreated(
      message: msg,
      toUserId: toUserId,
      groupId: groupId,
      pushDesc: description.isEmpty ? data : description,
    );
  });
}