resend Message Flow
Resends a failed user message.
Return
The user message
Since
4.17.0
Parameters
user Message
Failed userMessage.
Resend message with the original file object set when the file message was sent.
** 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.17.0
Parameters
file Message
The file message to resend
fun GroupChannel.resendMessageFlow(multipleFilesMessage: MultipleFilesMessage): Flow<MultipleFilesMessageResult>
Resends multiple files or file URLs as a single MultipleFilesMessage.
Return
The Flow of MultipleFilesMessageResult. Or throw SendbirdException if request failed.
Since
4.17.0
Parameters
multiple Files Message
Failed multiple files message.