diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 79f7a00b8..030d29d45 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -2013,6 +2013,11 @@ void ConfigManager::process_app_config(tl_object_ptr &c G()->set_option_integer("story_link_area_count_max", get_json_value_int(std::move(key_value->value_), key)); continue; } + if (key == "stars_paid_post_amount_max") { + G()->set_option_integer("paid_media_message_star_count_max", + clamp(get_json_value_int(std::move(key_value->value_), key), 0, 1000000)); + continue; + } new_values.push_back(std::move(key_value)); } diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index 8baa225a2..86674904a 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 = 48; + static constexpr int32 CURRENT_VERSION = 49; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr config_; diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index b619ca7ed..9d29a2624 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -153,6 +153,7 @@ OptionManager::OptionManager(Td *td) set_default_integer_option("fact_check_length_max", 1024); set_default_integer_option("star_withdrawal_count_min", is_test_dc ? 10 : 1000); set_default_integer_option("story_link_area_count_max", 3); + set_default_integer_option("paid_media_message_star_count_max", 10000); if (options.isset("my_phone_number") || !options.isset("my_id")) { update_premium_options();