sendScheduledMessageNow method

Future<void> sendScheduledMessageNow({
  1. required int scheduledMessageId,
  2. OnScheduledMessageSendNowCallback? callback,
})

Sends Scheduled Message Now

Implementation

Future<void> sendScheduledMessageNow({
  required int scheduledMessageId,
  OnScheduledMessageSendNowCallback? callback,
}) async {
  try {
    return _sdk.api.send(
      GroupChannelScheduledMessageSendNowRequest(
        channelType: channelType,
        channelUrl: channelUrl,
        scheduledMessageId: scheduledMessageId,
      ),
    );
  } catch (e) {
    if (callback != null) {
      callback(SBError(message: 'Failed Sending Request'));
    }

    rethrow;
  }
}