diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 92353df2b..366b3339d 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -6325,6 +6325,9 @@ getPremiumFeatures source:PremiumSource = PremiumFeatures; //@description Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen @feature The viewed premium feature viewPremiumFeature feature:PremiumFeature = Ok; +//@description Informs TDLib that the user clicked Premium subscription button on the Premium features screen +clickPremiumSubscriptionButton = Ok; + //@description Accepts Telegram terms of services @terms_of_service_id Terms of service identifier acceptTermsOfService terms_of_service_id:string = Ok; diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 7979e7887..7f8adf5d6 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -268,4 +268,10 @@ void view_premium_feature(Td *td, const td_api::object_ptr &&promise) { + vector> data; + save_app_log(td, "premium.promo_screen_accept", DialogId(), make_tl_object(std::move(data)), + std::move(promise)); +} + } // namespace td diff --git a/td/telegram/Premium.h b/td/telegram/Premium.h index 266ef9976..cbcb0374a 100644 --- a/td/telegram/Premium.h +++ b/td/telegram/Premium.h @@ -27,4 +27,6 @@ void get_premium_features(Td *td, const td_api::object_ptr &feature, Promise &&promise); +void click_premium_subscription_button(Td *td, Promise &&promise); + } // namespace td diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 054327a28..0a55576ff 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -7844,6 +7844,12 @@ void Td::on_request(uint64 id, const td_api::viewPremiumFeature &request) { view_premium_feature(this, request.feature_, std::move(promise)); } +void Td::on_request(uint64 id, const td_api::clickPremiumSubscriptionButton &request) { + CHECK_IS_USER(); + CREATE_OK_REQUEST_PROMISE(); + click_premium_subscription_button(this, std::move(promise)); +} + void Td::on_request(uint64 id, td_api::acceptTermsOfService &request) { CHECK_IS_USER(); CLEAN_INPUT_STRING(request.terms_of_service_id_); diff --git a/td/telegram/Td.h b/td/telegram/Td.h index 768591a14..409e071e6 100644 --- a/td/telegram/Td.h +++ b/td/telegram/Td.h @@ -1294,6 +1294,8 @@ class Td final : public Actor { void on_request(uint64 id, const td_api::viewPremiumFeature &request); + void on_request(uint64 id, const td_api::clickPremiumSubscriptionButton &request); + void on_request(uint64 id, td_api::acceptTermsOfService &request); void on_request(uint64 id, const td_api::getCountries &request); diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index c1a4a3657..f9d382b7c 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -2553,6 +2553,8 @@ class CliClient final : public Actor { } else if (op == "vprf") { auto feature = td_api::make_object(); send_request(td_api::make_object(std::move(feature))); + } else if (op == "cprsb") { + send_request(td_api::make_object()); } else if (op == "atos") { send_request(td_api::make_object(args)); } else if (op == "gdli") {