diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 11abf78a89..0b067eac1f 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -437,43 +437,6 @@ HistoryInner::HistoryInner( _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 &result) { - if (result.v.isEmpty()) { - return; - } - const auto &data = result.v.front().data(); - const auto randomId = base::RandomValue(); - 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( controller, _peer