MessageLocationContent

@JsonClass(generateAdapter = true)
data class MessageLocationContent(@Json(name = "msgtype") val msgType: String = MessageType.MSGTYPE_LOCATION, @Json(name = "body") val body: String, @Json(name = "geo_uri") val geoUri: String, @Json(name = "m.relates_to") val relatesTo: RelationDefaultContent? = null, @Json(name = "m.new_content") val newContent: Content? = null, @Json(name = "org.matrix.msc3488.location") val unstableLocationInfo: LocationInfo? = null, @Json(name = "m.location") val locationInfo: LocationInfo? = null, @Json(name = "org.matrix.msc3488.ts") val unstableTimestampMillis: Long? = null, @Json(name = "m.ts") val timestampMillis: Long? = null, @Json(name = "org.matrix.msc1767.text") val unstableText: String? = null, @Json(name = "m.text") val text: String? = null, @Json(name = "org.matrix.msc3488.asset") val unstableLocationAsset: LocationAsset? = null, @Json(name = "m.asset") val locationAsset: LocationAsset? = null) : MessageContent

Constructors

Link copied to clipboard
constructor(@Json(name = "msgtype") msgType: String = MessageType.MSGTYPE_LOCATION, @Json(name = "body") body: String, @Json(name = "geo_uri") geoUri: String, @Json(name = "m.relates_to") relatesTo: RelationDefaultContent? = null, @Json(name = "m.new_content") newContent: Content? = null, @Json(name = "org.matrix.msc3488.location") unstableLocationInfo: LocationInfo? = null, @Json(name = "m.location") locationInfo: LocationInfo? = null, @Json(name = "org.matrix.msc3488.ts") unstableTimestampMillis: Long? = null, @Json(name = "m.ts") timestampMillis: Long? = null, @Json(name = "org.matrix.msc1767.text") unstableText: String? = null, @Json(name = "m.text") text: String? = null, @Json(name = "org.matrix.msc3488.asset") unstableLocationAsset: LocationAsset? = null, @Json(name = "m.asset") locationAsset: LocationAsset? = null)

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

Properties

Link copied to clipboard
open override val body: String

Required. A description of the location e.g. 'Big Ben, London, UK', or some kind of content description for accessibility e.g. 'location attachment'.

Link copied to clipboard

Required. RFC5870 formatted geo uri 'geo:latitude,longitude;u=uncertainty' like 'geo:40.05,29.24;u=30' representing this location.

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

Required. Must be 'm.location'.

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

Defines a generic asset that can be used for location tracking but also in other places like inventories, geofencing, checkins/checkouts etc. It should contain a mandatory namespaced type key defining what particular asset is being referred to. For the purposes of user location tracking m.self should be used in order to avoid duplicating the mxid. See MSC3488

Link copied to clipboard
Link copied to clipboard
val unstableText: String? = null
Link copied to clipboard

Exact time that the data in the event refers to (milliseconds since the UNIX epoch).