From d4ea517c2f0cd7ff17394d852052fd6e2930378e Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 30 Dec 2024 23:45:39 +0300 Subject: [PATCH] Add sendGift.pay_for_upgrade. --- telegram-bot-api/Client.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 41756fb..8ef543a 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -11384,12 +11384,13 @@ td::Status Client::process_get_available_gifts_query(PromisedQueryPtr &query) { td::Status Client::process_send_gift_query(PromisedQueryPtr &query) { auto gift_id = td::to_integer(query->arg("gift_id")); + auto pay_for_upgrade = to_bool(query->arg("pay_for_upgrade")); TRY_RESULT(user_id, get_user_id(query.get())); TRY_RESULT(text, get_formatted_text(query->arg("text").str(), query->arg("text_parse_mode").str(), get_input_entities(query.get(), "text_entities"))); check_user(user_id, std::move(query), - [this, gift_id, user_id, text = std::move(text)](PromisedQueryPtr query) mutable { - send_request(make_object(gift_id, user_id, std::move(text), false, false), + [this, gift_id, pay_for_upgrade, user_id, text = std::move(text)](PromisedQueryPtr query) mutable { + send_request(make_object(gift_id, user_id, std::move(text), false, pay_for_upgrade), td::make_unique(std::move(query))); }); return td::Status::OK();