MessageFileContent

@JsonClass(generateAdapter = true)
data class MessageFileContent(@Json(name = "msgtype") val msgType: String, @Json(name = "body") val body: String, @Json(name = "filename") val filename: String? = null, @Json(name = "info") val info: FileInfo? = null, @Json(name = "url") val url: String? = null, @Json(name = "m.relates_to") val relatesTo: RelationDefaultContent? = null, @Json(name = "m.new_content") val newContent: Content? = null, @Json(name = "file") val encryptedFileInfo: EncryptedFileInfo? = null) : MessageWithAttachmentContent

Constructors

Link copied to clipboard
constructor(@Json(name = "msgtype") msgType: String, @Json(name = "body") body: String, @Json(name = "filename") filename: String? = null, @Json(name = "info") info: FileInfo? = null, @Json(name = "url") url: String? = null, @Json(name = "m.relates_to") relatesTo: RelationDefaultContent? = null, @Json(name = "m.new_content") newContent: Content? = null, @Json(name = "file") encryptedFileInfo: EncryptedFileInfo? = null)

Functions

Link copied to clipboard
Link copied to clipboard

Get the url of the encrypted file or of the file.

Link copied to clipboard

Get the latest displayable content. Will take care to hide spoiler text

Properties

Link copied to clipboard
open override val body: String

Required. A human-readable description of the file. This is recommended to be the filename of the original upload.

Link copied to clipboard
open override val encryptedFileInfo: EncryptedFileInfo? = null

Required if the file is encrypted. Information on the encrypted file, as specified in End-to-end encryption.

Link copied to clipboard
val filename: String? = null

The original filename of the uploaded file.

Link copied to clipboard
val info: FileInfo? = null

Information about the file referred to in url.

Link copied to clipboard
open override val mimeType: String?
Link copied to clipboard
open override val msgType: String

Required. Must be 'm.file'.

Link copied to clipboard
open override val newContent: Content? = null
Link copied to clipboard
open override val relatesTo: RelationDefaultContent? = null
Link copied to clipboard
open override val url: String? = null

Required if the file is unencrypted. The URL (typically MXC URI) to the file.