resendFileMessage method
- FileMessage message,
- {required FileMessageCreateParams params,
- FileMessageHandler? handler,
- ProgressHandler? progressHandler}
Resends a file with given file information.
Implementation
FileMessage resendFileMessage(
FileMessage message, {
required FileMessageCreateParams params,
FileMessageHandler? handler,
ProgressHandler? progressHandler,
}) {
sbLog.i(StackTrace.current,
'params.uploadFile.name: ${params.fileInfo.fileName}');
checkUnsupportedAction();
if (message.sendingStatus != SendingStatus.failed) {
throw InvalidParameterException();
}
if (message.channelUrl != channelUrl) {
throw InvalidParameterException();
}
if (!message.isResendable()) {
throw InvalidParameterException();
}
return sendFileMessage(
params,
progressHandler: progressHandler,
handler: handler,
);
}