resend Message
Deprecated
As of 4.17.0, replaced with resendMessageFlow(message).
Replace with
resendMessageFlow(message)
Content copied to clipboard
Resends a failed user message.
Return
The user message
Since
4.15.0
Parameters
message
Failed userMessage.
fun BaseChannel.resendMessage(fileMessage: FileMessage, file: File?): Flow<MessageResult<FileMessage>>
Deprecated
As of 4.17.0, replaced with resendMessageFlow(fileMessage).
Replace with
resendMessageFlow(fileMessage)
Content copied to clipboard
Resend message
** Sample code **
baseChannel.resendMessageFlow(fileMessage)
.onEach {
when (it) {
is MessageResult.Pending -> {
// called it when sending message are called
// it contains pendingMessage
}
is MessageResult.Succeed -> {
// called it with result data when all job has been completed
}
is MessageResult.Failure -> {
// deliver exception with failed message when all job has been completed
// it.message : failed message
// it.e : exception
}
}
}.catch {
// error occurred (validation failed)
}.launchIn(viewModelScope)
Content copied to clipboard
Return
The file message
Since
4.15.0
Parameters
file Message
The file message to resend
file
The file to resend
fun GroupChannel.resendMessage(multipleFilesMessage: MultipleFilesMessage): Flow<MultipleFilesMessageResult>
Deprecated
As of 4.17.0, replaced with resendMessageFlow(multipleFilesMessage).
Replace with
resendMessageFlow(multipleFilesMessage)
Content copied to clipboard
Resends multiple files or file URLs as a single MultipleFilesMessage.
Return
The Flow of MultipleFilesMessageResult. Or throw SendbirdException if request failed.
Since
4.15.0
Parameters
multiple Files Message
Failed multiple files message.