GroupChannelScheduledUserMessageSendRequest constructor

GroupChannelScheduledUserMessageSendRequest({
  1. required String channelUrl,
  2. required ScheduledUserMessageParams params,
})

Implementation

GroupChannelScheduledUserMessageSendRequest({
  required String channelUrl,
  required ScheduledUserMessageParams params,
}) {
  if (userId == null) {
    throw InvalidParameterError;
  }
  url = 'group_channels/$channelUrl/scheduled_messages';
  body = {
    'user_id': userId,
    'message_type': 'MESG',
  };
  body.addAll(params.toJson());
}