mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Remove old test code giveaway creation.
This commit is contained in:
parent
6471d43c71
commit
f5b59c9456
1 changed files with 0 additions and 37 deletions
|
@ -437,43 +437,6 @@ HistoryInner::HistoryInner(
|
||||||
_migrated->translateTo(_history->translatedTo());
|
_migrated->translateTo(_history->translatedTo());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (const auto channel = _history->peer->asBroadcast()) {
|
|
||||||
if (channel->amCreator()) {
|
|
||||||
const auto weak = base::make_weak(_controller);
|
|
||||||
channel->session().api().request(MTPpayments_GetPremiumGiftCodeOptions(
|
|
||||||
MTP_flags(MTPpayments_GetPremiumGiftCodeOptions::Flag::f_boost_peer),
|
|
||||||
channel->input
|
|
||||||
)).done(crl::guard(weak, [=](const MTPVector<MTPPremiumGiftCodeOption> &result) {
|
|
||||||
if (result.v.isEmpty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const auto &data = result.v.front().data();
|
|
||||||
const auto randomId = base::RandomValue<uint64>();
|
|
||||||
Payments::CheckoutProcess::Start(
|
|
||||||
Payments::InvoicePremiumGiftCode{
|
|
||||||
.purpose = Payments::InvoicePremiumGiftCodeGiveaway{
|
|
||||||
.boostPeer = channel,
|
|
||||||
//.additionalChannels = ,
|
|
||||||
.untilDate = (base::unixtime::now() + 300),
|
|
||||||
.onlyNewSubscribers = true,
|
|
||||||
},
|
|
||||||
.randomId = randomId,
|
|
||||||
.currency = qs(data.vcurrency()),
|
|
||||||
.amount = data.vamount().v,
|
|
||||||
.storeProduct = qs(data.vstore_product().value_or_empty()),
|
|
||||||
.storeQuantity = data.vstore_quantity().value_or_empty(),
|
|
||||||
.users = data.vusers().v,
|
|
||||||
.months = data.vmonths().v,
|
|
||||||
},
|
|
||||||
crl::guard(weak, [=](auto) { weak->window().activate(); }));
|
|
||||||
})).fail(crl::guard(weak, [=](const MTP::Error &error) {
|
|
||||||
weak.get()->showToast(error.type());
|
|
||||||
})).send();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Window::ChatThemeValueFromPeer(
|
Window::ChatThemeValueFromPeer(
|
||||||
controller,
|
controller,
|
||||||
_peer
|
_peer
|
||||||
|
|
Loading…
Add table
Reference in a new issue