Add storePaymentPurposePremiumSubscription.is_upgrade.
This commit is contained in:
parent
65ddaea0f6
commit
b339976ddf
@ -3819,8 +3819,8 @@ premiumState state:formattedText payment_options:vector<premiumPaymentOption> an
|
||||
|
||||
//@class StorePaymentPurpose @description Describes a purpose of an in-store payment
|
||||
|
||||
//@description The user subscribed to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store
|
||||
storePaymentPurposePremiumSubscription is_restore:Bool = StorePaymentPurpose;
|
||||
//@description The user subscribed to Telegram Premium @is_restore Pass true if this is a restore of a Telegram Premium purchase; only for App Store @is_upgrade Pass true if this is an upgrade from a monthly subscription to early subscription; only for App Store
|
||||
storePaymentPurposePremiumSubscription is_restore:Bool is_upgrade:Bool = StorePaymentPurpose;
|
||||
|
||||
//@description The user gifted Telegram Premium to another user @user_id Identifier of the user for which Premium was gifted @currency ISO 4217 currency code of the payment currency @amount Paid amount, in the smallest units of the currency
|
||||
storePaymentPurposeGiftedPremium user_id:int53 currency:string amount:int53 = StorePaymentPurpose;
|
||||
|
@ -90,6 +90,9 @@ static Result<tl_object_ptr<telegram_api::InputStorePaymentPurpose>> get_input_s
|
||||
if (p->is_restore_) {
|
||||
flags |= telegram_api::inputStorePaymentPremiumSubscription::RESTORE_MASK;
|
||||
}
|
||||
if (p->is_upgrade_) {
|
||||
flags |= telegram_api::inputStorePaymentPremiumSubscription::UPGRADE_MASK;
|
||||
}
|
||||
return make_tl_object<telegram_api::inputStorePaymentPremiumSubscription>(flags, false /*ignored*/,
|
||||
false /*ignored*/);
|
||||
}
|
||||
|
@ -2692,7 +2692,7 @@ class CliClient final : public Actor {
|
||||
get_args(args, user_id, currency, amount);
|
||||
if (currency.empty()) {
|
||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
||||
td_api::make_object<td_api::storePaymentPurposePremiumSubscription>(false)));
|
||||
td_api::make_object<td_api::storePaymentPurposePremiumSubscription>(false, false)));
|
||||
} else {
|
||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
||||
td_api::make_object<td_api::storePaymentPurposeGiftedPremium>(user_id, currency, amount)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user