resendMessage

fun BaseChannel.resendMessage(message: UserMessage): Flow<MessageResult<UserMessage>>

Deprecated

As of 4.17.0, replaced with resendMessageFlow(message).

Replace with

resendMessageFlow(message)

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)

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)

Return

The file message

Since

4.15.0

Parameters

fileMessage

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)

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

multipleFilesMessage

Failed multiple files message.