diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index d0e1e2957..05a729b69 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1991,10 +1991,11 @@ void ConfigManager::process_app_config(tl_object_ptr &c } if (key == "channel_bg_icon_level_min" || key == "channel_custom_wallpaper_level_min" || key == "channel_emoji_status_level_min" || key == "channel_profile_bg_icon_level_min" || - key == "channel_wallpaper_level_min" || key == "pm_read_date_expire_period" || - key == "group_transcribe_level_min" || key == "group_emoji_stickers_level_min" || - key == "group_profile_bg_icon_level_min" || key == "group_emoji_status_level_min" || - key == "group_wallpaper_level_min" || key == "group_custom_wallpaper_level_min") { + key == "channel_restrict_sponsored_level_min" || key == "channel_wallpaper_level_min" || + key == "pm_read_date_expire_period" || key == "group_transcribe_level_min" || + key == "group_emoji_stickers_level_min" || key == "group_profile_bg_icon_level_min" || + key == "group_emoji_status_level_min" || key == "group_wallpaper_level_min" || + key == "group_custom_wallpaper_level_min") { G()->set_option_integer(key, get_json_value_int(std::move(key_value->value_), key)); continue; } diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index 0e7bdb284..69a8fb3dc 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -103,7 +103,7 @@ class ConfigManager final : public NetQueryCallback { private: struct AppConfig { - static constexpr int32 CURRENT_VERSION = 35; + static constexpr int32 CURRENT_VERSION = 36; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr config_; diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 5579aa696..35733c0d7 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -132,6 +132,7 @@ OptionManager::OptionManager(Td *td) set_default_integer_option("channel_custom_wallpaper_level_min", is_test_dc ? 4 : 10); set_default_integer_option("channel_emoji_status_level_min", is_test_dc ? 2 : 8); set_default_integer_option("channel_profile_bg_icon_level_min", is_test_dc ? 1 : 7); + set_default_integer_option("channel_restrict_sponsored_level_min", is_test_dc ? 5 : 50); set_default_integer_option("channel_wallpaper_level_min", is_test_dc ? 3 : 9); set_default_integer_option("pm_read_date_expire_period", 604800); set_default_integer_option("group_transcribe_level_min", is_test_dc ? 4 : 6); @@ -352,6 +353,7 @@ bool OptionManager::is_internal_option(Slice name) { "channel_custom_wallpaper_level_min", "channel_emoji_status_level_min", "channel_profile_bg_icon_level_min", + "channel_restrict_sponsored_level_min", "channel_wallpaper_level_min", "channels_limit_default", "channels_limit_premium",