MessagePostParams constructor

MessagePostParams({
  1. required int channelId,
  2. required String body,
  3. required Map<String, dynamic> context,
  4. List<int> attachmentIds = const [],
})

Implementation

factory MessagePostParams({
  required int channelId,
  required String body,
  required Map<String, dynamic> context,
  List<int> attachmentIds = const [],
}) =>
    MessagePostParams._(
      args: [channelId],
      kwargs: {
        'attachment_ids': attachmentIds,
        'body': body,
        'context': context,
        'channel_ids': const <int>[],
        'message_type': 'comment',
        'partner_ids': const <int>[],
        'subtype_xmlid': 'mail.mt_comment',
        'subtype_id': 'mail.mt_comment',
      },
      method: 'message_post',
      model: 'mail.channel',
    );