diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 3502e19..783c996 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -10235,6 +10235,7 @@ td::Status Client::process_edit_message_text_query(PromisedQueryPtr &query) { td::Status Client::process_edit_message_live_location_query(PromisedQueryPtr &query) { object_ptr location = nullptr; + int32 live_period = get_integer_arg(query.get(), "live_period", 0); int32 heading = get_integer_arg(query.get(), "heading", 0); int32 proximity_alert_radius = get_integer_arg(query.get(), "proximity_alert_radius", 0); if (query->method() == "editmessagelivelocation") { @@ -10248,25 +10249,25 @@ td::Status Client::process_edit_message_live_location_query(PromisedQueryPtr &qu TRY_RESULT(inline_message_id, get_inline_message_id(query.get())); resolve_reply_markup_bot_usernames( std::move(reply_markup), std::move(query), - [this, inline_message_id = inline_message_id.str(), location = std::move(location), heading, + [this, inline_message_id = inline_message_id.str(), location = std::move(location), live_period, heading, proximity_alert_radius](object_ptr reply_markup, PromisedQueryPtr query) mutable { - send_request( - make_object( - inline_message_id, std::move(reply_markup), std::move(location), 0, heading, proximity_alert_radius), - td::make_unique(std::move(query))); + send_request(make_object(inline_message_id, std::move(reply_markup), + std::move(location), live_period, heading, + proximity_alert_radius), + td::make_unique(std::move(query))); }); } else { resolve_reply_markup_bot_usernames( std::move(reply_markup), std::move(query), - [this, chat_id = chat_id.str(), message_id, location = std::move(location), heading, proximity_alert_radius]( - object_ptr reply_markup, PromisedQueryPtr query) mutable { + [this, chat_id = chat_id.str(), message_id, location = std::move(location), live_period, heading, + proximity_alert_radius](object_ptr reply_markup, PromisedQueryPtr query) mutable { check_message(chat_id, message_id, false, AccessRights::Edit, "message to edit", std::move(query), - [this, location = std::move(location), heading, proximity_alert_radius, + [this, location = std::move(location), live_period, heading, proximity_alert_radius, reply_markup = std::move(reply_markup)](int64 chat_id, int64 message_id, PromisedQueryPtr query) mutable { send_request(make_object( - chat_id, message_id, std::move(reply_markup), std::move(location), 0, - heading, proximity_alert_radius), + chat_id, message_id, std::move(reply_markup), std::move(location), + live_period, heading, proximity_alert_radius), td::make_unique(this, std::move(query))); }); });