MessageBuilder
class MessageBuilder(val roomId: RoomId, val roomService: RoomService, val mediaService: MediaService, val ownUserId: UserId)
Constructors
Link copied to clipboard
constructor(roomId: RoomId, roomService: RoomService, mediaService: MediaService, ownUserId: UserId)
Functions
Link copied to clipboard
suspend fun MessageBuilder.audio(body: String, audio: ByteArrayFlow, format: String? = null, formattedBody: String? = null, fileName: String? = null, type: ContentType? = null, size: Long? = null, duration: Long? = null)
Link copied to clipboard
Link copied to clipboard
This allows to set a contentBuilder, that does not consider RelatesTo or Mentions.
Link copied to clipboard
suspend fun MessageBuilder.file(body: String, file: ByteArrayFlow, format: String? = null, formattedBody: String? = null, fileName: String? = null, type: ContentType? = null, size: Long? = null, thumbnail: ByteArrayFlow? = null, thumbnailInfo: ThumbnailInfo? = null)
Link copied to clipboard
suspend fun MessageBuilder.image(body: String, image: ByteArrayFlow, format: String? = null, formattedBody: String? = null, fileName: String? = null, type: ContentType? = null, size: Long? = null, height: Int? = null, width: Int? = null, thumbnail: ByteArrayFlow? = null, thumbnailInfo: ThumbnailInfo? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Important: eventRelatesTo should be set from the event, that is replied. Otherwise, thread support is dropped.
Link copied to clipboard
fun MessageBuilder.roomMessageBuilder(body: String, format: String?, formattedBody: String?, builder: RoomMessageBuilderInfo.() -> RoomMessageEventContent)
Link copied to clipboard
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: ByteArrayFlow, format: String? = null, formattedBody: String? = null, fileName: String? = null, type: ContentType? = null, size: Long? = null, height: Int? = null, width: Int? = null, duration: Long? = null, thumbnail: ByteArrayFlow? = null, thumbnailInfo: ThumbnailInfo? = null)