tg_cli: fix call to canPurchasePremium.
This commit is contained in:
parent
b8f4df741b
commit
d4b7ebdd1e
@ -2680,7 +2680,17 @@ class CliClient final : public Actor {
|
|||||||
} else if (op == "gprs") {
|
} else if (op == "gprs") {
|
||||||
send_request(td_api::make_object<td_api::getPremiumState>());
|
send_request(td_api::make_object<td_api::getPremiumState>());
|
||||||
} else if (op == "cppr") {
|
} else if (op == "cppr") {
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>());
|
UserId user_id;
|
||||||
|
string currency;
|
||||||
|
int64 amount;
|
||||||
|
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)));
|
||||||
|
} else {
|
||||||
|
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
||||||
|
td_api::make_object<td_api::storePaymentPurposeGiftedPremium>(user_id, currency, amount)));
|
||||||
|
}
|
||||||
} else if (op == "atos") {
|
} else if (op == "atos") {
|
||||||
send_request(td_api::make_object<td_api::acceptTermsOfService>(args));
|
send_request(td_api::make_object<td_api::acceptTermsOfService>(args));
|
||||||
} else if (op == "gdli") {
|
} else if (op == "gdli") {
|
||||||
|
Loading…
Reference in New Issue
Block a user