Add "chat_boost_level_max" option.

This commit is contained in:
levlam 2023-11-28 14:31:43 +03:00
parent 00f09dae62
commit ea9e99407f
3 changed files with 8 additions and 1 deletions

View File

@ -1967,6 +1967,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
transcribe_audio_trial_cooldown_until = get_json_value_int(std::move(key_value->value_), key);
continue;
}
if (key == "boosts_channel_level_max") {
G()->set_option_integer("chat_boost_level_max", max(0, get_json_value_int(std::move(key_value->value_), key)));
continue;
}
new_values.push_back(std::move(key_value));
}

View File

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

View File

@ -149,6 +149,9 @@ OptionManager::OptionManager(Td *td)
if (!have_option("premium_gift_boost_count")) {
set_option_integer("premium_gift_boost_count", 3);
}
if (!have_option("chat_boost_level_max")) {
set_option_integer("chat_boost_level_max", G()->is_test_dc() ? 10 : 100);
}
set_option_empty("archive_and_mute_new_chats_from_unknown_users");
set_option_empty("chat_filter_count_max");