send method

Future<Map<String, dynamic>> send({
  1. required String fromUserId,
  2. String? toUserId,
  3. String? groupId,
  4. String contentType = 'text',
  5. required dynamic content,
})

Implementation

Future<Map<String, dynamic>> send({
  required String fromUserId,
  String? toUserId,
  String? groupId,
  String contentType = 'text',
  required dynamic content,
}) {
  final body = <String, dynamic>{
    'appId': appId,
    'fromUserId': fromUserId,
    'contentType': contentType,
    'content': content,
  };
  if (toUserId != null) body['toUserId'] = toUserId;
  if (groupId != null) body['groupId'] = groupId;
  return _userPost('/api/user/im/send', body);
}