Add clickPremiumSubscriptionButton.
This commit is contained in:
parent
242776e817
commit
f443cec9bc
@ -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;
|
||||
|
@ -268,4 +268,10 @@ void view_premium_feature(Td *td, const td_api::object_ptr<td_api::PremiumFeatur
|
||||
std::move(promise));
|
||||
}
|
||||
|
||||
void click_premium_subscription_button(Td *td, Promise<Unit> &&promise) {
|
||||
vector<tl_object_ptr<telegram_api::jsonObjectValue>> data;
|
||||
save_app_log(td, "premium.promo_screen_accept", DialogId(), make_tl_object<telegram_api::jsonObject>(std::move(data)),
|
||||
std::move(promise));
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -27,4 +27,6 @@ void get_premium_features(Td *td, const td_api::object_ptr<td_api::PremiumSource
|
||||
|
||||
void view_premium_feature(Td *td, const td_api::object_ptr<td_api::PremiumFeature> &feature, Promise<Unit> &&promise);
|
||||
|
||||
void click_premium_subscription_button(Td *td, Promise<Unit> &&promise);
|
||||
|
||||
} // namespace td
|
||||
|
@ -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_);
|
||||
|
@ -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);
|
||||
|
@ -2553,6 +2553,8 @@ class CliClient final : public Actor {
|
||||
} else if (op == "vprf") {
|
||||
auto feature = td_api::make_object<td_api::premiumFeatureProfileBadge>();
|
||||
send_request(td_api::make_object<td_api::viewPremiumFeature>(std::move(feature)));
|
||||
} else if (op == "cprsb") {
|
||||
send_request(td_api::make_object<td_api::clickPremiumSubscriptionButton>());
|
||||
} else if (op == "atos") {
|
||||
send_request(td_api::make_object<td_api::acceptTermsOfService>(args));
|
||||
} else if (op == "gdli") {
|
||||
|
Loading…
Reference in New Issue
Block a user