Attachment

@Serializable
data class Attachment(val id: String = "", val name: String = "", val size: Long = 0, val type: String = "application/octet-stream", val url: String? = null)

A file attached to a message.

Constructors

Link copied to clipboard
constructor(id: String = "", name: String = "", size: Long = 0, type: String = "application/octet-stream", url: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val id: String

Upload id.

Link copied to clipboard

The attachment is an image.

Link copied to clipboard

Original file name.

Link copied to clipboard
val size: Long = 0

Size in bytes.

Link copied to clipboard

MIME type.

Link copied to clipboard
val url: String? = null

Signed download URL (rotates; fetch the message again when it expires).

Functions

Link copied to clipboard
fun toJson(): JsonObject

The wire shape.