diff options
| author | levlam <levlam@telegram.org> | 2022-12-31 00:17:18 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-12-31 00:17:18 +0300 |
| commit | 5ee9c7365b9533d207887e32a9d71645e5d30fd8 (patch) | |
| tree | 7c12921d9962788e7e0640353674eed667d13928 | |
| parent | b0bfdd2b35589ca262b46819a3b23757aeec536e (diff) | |
Remove "forum_member_count_min" option.
| -rw-r--r-- | td/generate/scheme/td_api.tl | 2 | ||||
| -rw-r--r-- | td/telegram/ConfigManager.cpp | 15 | ||||
| -rw-r--r-- | td/telegram/OptionManager.cpp | 4 |
3 files changed, 6 insertions, 15 deletions
diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 8ce34dd37..e286c2ec7 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -7358,7 +7358,7 @@ toggleSupergroupHasHiddenMembers supergroup_id:int53 has_hidden_members:Bool = O //@has_aggressive_anti_spam_enabled The new value of has_aggressive_anti_spam_enabled toggleSupergroupHasAggressiveAntiSpamEnabled supergroup_id:int53 has_aggressive_anti_spam_enabled:Bool = Ok; -//@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup @is_forum New value of is_forum. A supergroup can be converted to a forum, only if it has at least getOption("forum_member_count_min") members +//@description Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can't be converted to forums @supergroup_id Identifier of the supergroup @is_forum New value of is_forum toggleSupergroupIsForum supergroup_id:int53 is_forum:Bool = Ok; //@description Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id Identifier of the supergroup diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 4f75a6a27..195d91c37 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1492,7 +1492,6 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c bool is_premium_available = false; int32 stickers_premium_by_emoji_num = 0; int32 stickers_normal_by_emoji_per_premium_num = 2; - int32 forum_upgrade_participants_min = 200; int32 telegram_antispam_group_size_min = 100; int32 topics_pinned_limit = -1; vector<string> fragment_prefixes; @@ -1500,9 +1499,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c for (auto &key_value : static_cast<telegram_api::jsonObject *>(config.get())->value_) { Slice key = key_value->key_; telegram_api::JSONValue *value = key_value->value_.get(); - if (key == "default_emoji_statuses_stickerset_id" || key == "getfile_experimental_params" || - key == "message_animated_emoji_max" || key == "reactions_in_chat_max" || key == "stickers_emoji_cache_time" || - key == "test" || key == "upload_max_fileparts_default" || key == "upload_max_fileparts_premium" || + if (key == "default_emoji_statuses_stickerset_id" || key == "forum_upgrade_participants_min" || + key == "getfile_experimental_params" || key == "message_animated_emoji_max" || + key == "reactions_in_chat_max" || key == "stickers_emoji_cache_time" || key == "test" || + key == "upload_max_fileparts_default" || key == "upload_max_fileparts_premium" || key == "wallet_blockchain_name" || key == "wallet_config" || key == "wallet_enabled") { continue; } @@ -1843,10 +1843,6 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c G()->set_option_integer(key, setting_value); continue; } - if (key == "forum_upgrade_participants_min") { - forum_upgrade_participants_min = get_json_value_int(std::move(key_value->value_), key); - continue; - } if (key == "telegram_antispam_user_id") { auto setting_value = get_json_value_long(std::move(key_value->value_), key); G()->set_option_integer("anti_spam_bot_user_id", setting_value); @@ -1970,9 +1966,6 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c } else { options.set_option_integer("reactions_uniq_max", reactions_uniq_max); } - if (forum_upgrade_participants_min >= 0) { - options.set_option_integer("forum_member_count_min", forum_upgrade_participants_min); - } if (telegram_antispam_group_size_min >= 0) { options.set_option_integer("aggressive_anti_spam_supergroup_member_count_min", telegram_antispam_group_size_min); } diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 25aedd0cd..d89c1b84e 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -112,9 +112,6 @@ OptionManager::OptionManager(Td *td) if (!have_option("chat_filter_chosen_chat_count_max")) { set_option_integer("chat_filter_chosen_chat_count_max", G()->is_test_dc() ? 5 : 100); } - if (!have_option("forum_member_count_min")) { - set_option_integer("forum_member_count_min", G()->is_test_dc() ? 3 : 100); - } if (!have_option("aggressive_anti_spam_supergroup_member_count_min")) { set_option_integer("aggressive_anti_spam_supergroup_member_count_min", G()->is_test_dc() ? 1 : 100); } @@ -122,6 +119,7 @@ OptionManager::OptionManager(Td *td) set_option_integer("pinned_forum_topic_count_max", G()->is_test_dc() ? 3 : 5); } + set_option_empty("forum_member_count_min"); set_option_empty("themed_emoji_statuses_sticker_set_id"); set_option_empty("themed_premium_statuses_sticker_set_id"); } |
