diff --git a/crates/teloxide-core/schema.ron b/crates/teloxide-core/schema.ron index 6e1708f9..1f43cf62 100644 --- a/crates/teloxide-core/schema.ron +++ b/crates/teloxide-core/schema.ron @@ -1375,6 +1375,11 @@ Schema( ty: f64, descr: Doc(md: "Longitude of new location"), ), + Param( + name: "live_period", + ty: Option(RawTy("LivePeriod")), + descr: Doc(md: "New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged"), + ), Param( name: "horizontal_accuracy", ty: Option(f64), diff --git a/crates/teloxide-core/src/payloads/edit_message_live_location.rs b/crates/teloxide-core/src/payloads/edit_message_live_location.rs index a3168fe9..5f5b8332 100644 --- a/crates/teloxide-core/src/payloads/edit_message_live_location.rs +++ b/crates/teloxide-core/src/payloads/edit_message_live_location.rs @@ -2,7 +2,7 @@ use serde::Serialize; -use crate::types::{Message, MessageId, Recipient, ReplyMarkup}; +use crate::types::{LivePeriod, Message, MessageId, Recipient, ReplyMarkup}; impl_payload! { /// Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to [`StopMessageLiveLocation`]. On success, the edited Message is returned. @@ -24,6 +24,8 @@ impl_payload! { pub longitude: f64, } optional { + /// New period in seconds during which the location can be updated, starting from the message send date. If 0x7FFFFFFF is specified, then the location can be updated forever. Otherwise, the new value must not exceed the current live_period by more than a day, and the live location expiration date must remain within the next 90 days. If not specified, then live_period remains unchanged + pub live_period: LivePeriod, /// The radius of uncertainty for the location, measured in meters; 0-1500 pub horizontal_accuracy: f64, /// For live locations, a direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.