1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-23 00:57:13 +00:00

add LiveLocation.Companion#INDEFINITE_LIVE_PERIOD

This commit is contained in:
InsanusMokrassar 2024-05-06 21:41:01 +06:00
parent 71b9f15e40
commit 4e416aaf44

View File

@ -41,12 +41,16 @@ data class LiveLocation(
@SerialName(horizontalAccuracyField)
override val horizontalAccuracy: Meters? = null,
@SerialName(livePeriodField)
override val livePeriod: Seconds,
override val livePeriod: Seconds = INDEFINITE_LIVE_PERIOD,
@SerialName(headingField)
override val heading: Degrees? = null,
@SerialName(proximityAlertRadiusField)
override val proximityAlertRadius: Meters? = null
) : Location, Livable, ProximityAlertable, Headed
) : Location, Livable, ProximityAlertable, Headed {
companion object {
const val INDEFINITE_LIVE_PERIOD: Seconds = 0x7FFFFFFF
}
}
object LocationSerializer : KSerializer<Location> {
private val internalSerializer = JsonObject.serializer()