From 48de6515585738296f7462e6c4e4669fd89367c5 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 17 May 2024 13:36:25 +0300 Subject: [PATCH] Add starPaymentOption.is_additional. --- td/generate/scheme/td_api.tl | 3 ++- td/telegram/Premium.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 019da2910..f59d010ee 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -827,7 +827,8 @@ premiumGiftCodeInfo creator_id:MessageSender creation_date:int32 is_from_giveawa //@amount The amount to pay, in the smallest units of the currency //@star_count Number of stars that will be purchased //@store_product_id Identifier of the store product associated with the option; may be empty if none -starPaymentOption currency:string amount:int53 star_count:int53 store_product_id:string = StarPaymentOption; +//@is_additional True, if the option must be shown only in the full list of payment options +starPaymentOption currency:string amount:int53 star_count:int53 store_product_id:string is_additional:Bool = StarPaymentOption; //@description Contains a list of options for buying Telegram stars @options The list of options starPaymentOptions options:vector = StarPaymentOptions; diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 561af08c6..b1b594b9b 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -628,8 +628,8 @@ class GetStarsTopupOptionsQuery final : public Td::ResultHandler { auto results = result_ptr.move_as_ok(); vector> options; for (auto &result : results) { - options.push_back(td_api::make_object(result->currency_, result->amount_, - result->stars_, result->store_product_)); + options.push_back(td_api::make_object( + result->currency_, result->amount_, result->stars_, result->store_product_, result->extended_)); } promise_.set_value(td_api::make_object(std::move(options)));