send File Message Flow
fun BaseChannel.sendFileMessageFlow(params: FileMessageCreateParams): Flow<MessageResult<FileMessage>>
Sends a file with given file information.
** Sample code **
baseChannel.sendFileMessageFlow(params)
.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
params
The parameters to send file message
See also
File Message Create Params