MessageBuilder

class MessageBuilder(val isEncryptedRoom: Boolean, val mediaService: MediaService)

Constructors

Link copied to clipboard
fun MessageBuilder(isEncryptedRoom: Boolean, mediaService: MediaService)

Functions

Link copied to clipboard
suspend fun build(builder: suspend MessageBuilder.() -> Unit): MessageEventContent?

Properties

Link copied to clipboard
var contentBuilder: (RelatesTo?) -> MessageEventContent?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var relatesTo: RelatesTo? = null

Extensions

Link copied to clipboard
suspend fun MessageBuilder.audio(body: String, audio: ByteFlow, type: ContentType, size: Int? = null, duration: Int? = null)
Link copied to clipboard
fun MessageBuilder.emote(body: String, format: String? = null, formattedBody: String? = null)
Link copied to clipboard
suspend fun MessageBuilder.file(body: String, file: ByteFlow, type: ContentType, size: Int? = null, name: String? = null)
Link copied to clipboard
suspend fun MessageBuilder.image(body: String, image: ByteFlow, type: ContentType, size: Int? = null, height: Int? = null, width: Int? = null)
Link copied to clipboard
fun MessageBuilder.notice(body: String, format: String? = null, formattedBody: String? = null)
Link copied to clipboard
fun MessageBuilder.replace(event: Event.MessageEvent<*>)
fun MessageBuilder.replace(eventId: EventId)
Link copied to clipboard
fun MessageBuilder.reply(event: Event.MessageEvent<*>)
fun MessageBuilder.reply(eventId: EventId, eventRelatesTo: RelatesTo? = null)
Link copied to clipboard
fun MessageBuilder.text(body: String, format: String? = null, formattedBody: String? = null)
Link copied to clipboard
fun MessageBuilder.thread(event: TimelineEvent, reply: Boolean = false)
fun MessageBuilder.thread(event: Event.MessageEvent<*>, reply: Boolean = false)

event must be the last known event of a thread.

fun MessageBuilder.thread(eventId: EventId, eventRelatesTo: RelatesTo? = null, reply: Boolean = false)

eventId and eventRelatesTo must be from the last known event of a thread.

Link copied to clipboard
suspend fun MessageBuilder.video(body: String, video: ByteFlow, type: ContentType, size: Int? = null, height: Int? = null, width: Int? = null, duration: Int? = null)