diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 8ba60c9f5..8fd9dd532 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -2058,6 +2058,10 @@ void ConfigManager::process_app_config(tl_object_ptr &c G()->set_option_integer("paid_reaction_star_count_max", get_json_value_int(std::move(key_value->value_), key)); continue; } + if (key == "stars_subscription_amount_max") { + G()->set_option_integer("subscription_star_count_max", get_json_value_int(std::move(key_value->value_), key)); + continue; + } new_values.push_back(std::move(key_value)); } diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index 9c97da476..ec97a82e5 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -85,7 +85,7 @@ class ConfigManager final : public NetQueryCallback { private: struct AppConfig { - static constexpr int32 CURRENT_VERSION = 57; + static constexpr int32 CURRENT_VERSION = 58; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr config_; diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 5c71c1482..9e1aef55e 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -157,6 +157,7 @@ OptionManager::OptionManager(Td *td) set_default_integer_option("paid_media_message_star_count_max", 10000); set_default_integer_option("bot_media_preview_count_max", 12); set_default_integer_option("paid_reaction_star_count_max", 2500); + set_default_integer_option("subscription_star_count_max", 2500); if (options.isset("my_phone_number") || !options.isset("my_id")) { update_premium_options();