mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 10:25:35 +03:00
Support aggregation of live location beacon events.
This commit is contained in:
parent
2a42eb8c87
commit
aae281a7ea
1 changed files with 8 additions and 1 deletions
|
@ -20,6 +20,7 @@ import com.squareup.moshi.Json
|
|||
import com.squareup.moshi.JsonClass
|
||||
import org.matrix.android.sdk.api.session.room.model.message.LocationAsset
|
||||
import org.matrix.android.sdk.api.session.room.model.message.LocationAssetType
|
||||
import org.matrix.android.sdk.api.session.room.model.message.MessageLiveLocationContent
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class LiveLocationBeaconContent(
|
||||
|
@ -37,7 +38,13 @@ data class LiveLocationBeaconContent(
|
|||
* Live location asset type.
|
||||
*/
|
||||
@Json(name = "org.matrix.msc3488.asset") val unstableLocationAsset: LocationAsset = LocationAsset(LocationAssetType.SELF),
|
||||
@Json(name = "m.asset") val locationAsset: LocationAsset? = null
|
||||
@Json(name = "m.asset") val locationAsset: LocationAsset? = null,
|
||||
|
||||
/**
|
||||
* Client side tracking of the last location
|
||||
*/
|
||||
@Transient
|
||||
val lastLocationContent: MessageLiveLocationContent? = null
|
||||
) {
|
||||
|
||||
fun getBestBeaconInfo() = beaconInfo ?: unstableBeaconInfo
|
||||
|
|
Loading…
Reference in a new issue