Add "giveaway_boost_count_per_premium" option.

This commit is contained in:
levlam 2023-10-18 18:25:42 +03:00
parent c249fe39af
commit 7eec2eb54b
3 changed files with 9 additions and 1 deletions

View File

@ -1926,6 +1926,11 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
G()->set_option_integer("giveaway_country_count_max", get_json_value_int(std::move(key_value->value_), key));
continue;
}
if (key == "giveaway_boosts_per_premium") {
G()->set_option_integer("giveaway_boost_count_per_premium",
get_json_value_int(std::move(key_value->value_), key));
continue;
}
if (key == "channel_color_level_min") {
G()->set_option_integer("channel_custom_accent_color_boost_level_min",
get_json_value_int(std::move(key_value->value_), key));

View File

@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback {
private:
struct AppConfig {
static constexpr int32 CURRENT_VERSION = 17;
static constexpr int32 CURRENT_VERSION = 18;
int32 version_ = 0;
int32 hash_ = 0;
telegram_api::object_ptr<telegram_api::JSONValue> config_;

View File

@ -134,6 +134,9 @@ OptionManager::OptionManager(Td *td)
if (!have_option("giveaway_country_count_max")) {
set_option_integer("giveaway_country_count_max", G()->is_test_dc() ? 3 : 10);
}
if (!have_option("giveaway_boost_count_per_premium")) {
set_option_integer("giveaway_boost_count_per_premium", 4);
}
if (!have_option("channel_custom_accent_color_boost_level_min")) {
set_option_integer("channel_custom_accent_color_boost_level_min", 1);
}