2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Added ability to filter users by countries for giveaway to giveaway box.

This commit is contained in:
23rd
2023-10-31 20:43:07 +03:00
committed by John Preston
parent 2d097ca9ae
commit fc6d4d66b7
6 changed files with 127 additions and 12 deletions

View File

@@ -442,4 +442,11 @@ Data::SubscriptionOptions PremiumGiftCodeOptions::options(int amount) {
kFallbackCount);
}
[[nodiscard]] int PremiumGiftCodeOptions::giveawayCountriesMax() const {
constexpr auto kFallbackCount = 10;
return _peer->session().account().appConfig().get<int>(
u"giveaway_countries_max"_q,
kFallbackCount);
}
} // namespace Api