Improve the name of the method canPurchaseFromStore.
This commit is contained in:
parent
d6ed36f218
commit
88ee1e8a65
@ -10742,8 +10742,8 @@ launchPrepaidPremiumGiveaway giveaway_id:int64 parameters:premiumGiveawayParamet
|
|||||||
//@message_id Identifier of the giveaway or a giveaway winners message in the chat
|
//@message_id Identifier of the giveaway or a giveaway winners message in the chat
|
||||||
getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo;
|
getPremiumGiveawayInfo chat_id:int53 message_id:int53 = PremiumGiveawayInfo;
|
||||||
|
|
||||||
//@description Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase @purpose Transaction purpose
|
//@description Checks whether an in-store purchase is possible. Must be called before any in-store purchase @purpose Transaction purpose
|
||||||
canPurchasePremium purpose:StorePaymentPurpose = Ok;
|
canPurchaseFromStore purpose:StorePaymentPurpose = Ok;
|
||||||
|
|
||||||
//@description Informs server about a purchase through App Store. For official applications only @receipt App Store receipt @purpose Transaction purpose
|
//@description Informs server about a purchase through App Store. For official applications only @receipt App Store receipt @purpose Transaction purpose
|
||||||
assignAppStoreTransaction receipt:bytes purpose:StorePaymentPurpose = Ok;
|
assignAppStoreTransaction receipt:bytes purpose:StorePaymentPurpose = Ok;
|
||||||
|
@ -9388,7 +9388,7 @@ void Td::on_request(uint64 id, const td_api::getPremiumGiveawayInfo &request) {
|
|||||||
get_premium_giveaway_info(this, {DialogId(request.chat_id_), MessageId(request.message_id_)}, std::move(promise));
|
get_premium_giveaway_info(this, {DialogId(request.chat_id_), MessageId(request.message_id_)}, std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_request(uint64 id, td_api::canPurchasePremium &request) {
|
void Td::on_request(uint64 id, td_api::canPurchaseFromStore &request) {
|
||||||
CHECK_IS_USER();
|
CHECK_IS_USER();
|
||||||
CREATE_OK_REQUEST_PROMISE();
|
CREATE_OK_REQUEST_PROMISE();
|
||||||
can_purchase_premium(this, std::move(request.purpose_), std::move(promise));
|
can_purchase_premium(this, std::move(request.purpose_), std::move(promise));
|
||||||
|
@ -1833,7 +1833,7 @@ class Td final : public Actor {
|
|||||||
|
|
||||||
void on_request(uint64 id, const td_api::getPremiumGiveawayInfo &request);
|
void on_request(uint64 id, const td_api::getPremiumGiveawayInfo &request);
|
||||||
|
|
||||||
void on_request(uint64 id, td_api::canPurchasePremium &request);
|
void on_request(uint64 id, td_api::canPurchaseFromStore &request);
|
||||||
|
|
||||||
void on_request(uint64 id, td_api::assignAppStoreTransaction &request);
|
void on_request(uint64 id, td_api::assignAppStoreTransaction &request);
|
||||||
|
|
||||||
|
@ -3380,36 +3380,36 @@ class CliClient final : public Actor {
|
|||||||
MessageId message_id;
|
MessageId message_id;
|
||||||
get_args(args, chat_id, message_id);
|
get_args(args, chat_id, message_id);
|
||||||
send_request(td_api::make_object<td_api::getPremiumGiveawayInfo>(chat_id, message_id));
|
send_request(td_api::make_object<td_api::getPremiumGiveawayInfo>(chat_id, message_id));
|
||||||
} else if (op == "cppr" || op == "cpprb") {
|
} else if (op == "cpfs" || op == "cpfsb") {
|
||||||
UserId user_id;
|
UserId user_id;
|
||||||
string currency;
|
string currency;
|
||||||
int64 amount;
|
int64 amount;
|
||||||
ChatId boosted_chat_id;
|
ChatId boosted_chat_id;
|
||||||
get_args(args, user_id, currency, amount, boosted_chat_id);
|
get_args(args, user_id, currency, amount, boosted_chat_id);
|
||||||
if (currency.empty()) {
|
if (currency.empty()) {
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
send_request(td_api::make_object<td_api::canPurchaseFromStore>(
|
||||||
td_api::make_object<td_api::storePaymentPurposePremiumSubscription>(false, false)));
|
td_api::make_object<td_api::storePaymentPurposePremiumSubscription>(false, false)));
|
||||||
} else if (op == "cppr") {
|
} else if (op == "cpfs") {
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
send_request(td_api::make_object<td_api::canPurchaseFromStore>(
|
||||||
td_api::make_object<td_api::storePaymentPurposeGiftedPremium>(user_id, currency, amount)));
|
td_api::make_object<td_api::storePaymentPurposeGiftedPremium>(user_id, currency, amount)));
|
||||||
} else {
|
} else {
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
send_request(td_api::make_object<td_api::canPurchaseFromStore>(
|
||||||
td_api::make_object<td_api::storePaymentPurposePremiumGiftCodes>(boosted_chat_id, currency, amount,
|
td_api::make_object<td_api::storePaymentPurposePremiumGiftCodes>(boosted_chat_id, currency, amount,
|
||||||
vector<int64>{user_id})));
|
vector<int64>{user_id})));
|
||||||
}
|
}
|
||||||
} else if (op == "cpprg") {
|
} else if (op == "cpfsg") {
|
||||||
PremiumGiveawayParameters parameters;
|
PremiumGiveawayParameters parameters;
|
||||||
string currency;
|
string currency;
|
||||||
int64 amount;
|
int64 amount;
|
||||||
get_args(args, parameters, currency, amount);
|
get_args(args, parameters, currency, amount);
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
send_request(td_api::make_object<td_api::canPurchaseFromStore>(
|
||||||
td_api::make_object<td_api::storePaymentPurposePremiumGiveaway>(parameters, currency, amount)));
|
td_api::make_object<td_api::storePaymentPurposePremiumGiveaway>(parameters, currency, amount)));
|
||||||
} else if (op == "cpprs") {
|
} else if (op == "cpfss") {
|
||||||
string currency;
|
string currency;
|
||||||
int64 amount;
|
int64 amount;
|
||||||
int64 star_count;
|
int64 star_count;
|
||||||
get_args(args, currency, amount, star_count);
|
get_args(args, currency, amount, star_count);
|
||||||
send_request(td_api::make_object<td_api::canPurchasePremium>(
|
send_request(td_api::make_object<td_api::canPurchaseFromStore>(
|
||||||
td_api::make_object<td_api::storePaymentPurposeStars>(currency, amount, star_count)));
|
td_api::make_object<td_api::storePaymentPurposeStars>(currency, amount, star_count)));
|
||||||
} else if (op == "gbf") {
|
} else if (op == "gbf") {
|
||||||
send_request(td_api::make_object<td_api::getBusinessFeatures>(nullptr));
|
send_request(td_api::make_object<td_api::getBusinessFeatures>(nullptr));
|
||||||
|
Loading…
Reference in New Issue
Block a user