Add "bot_media_preview_count_max" option.
This commit is contained in:
parent
cdd7af6ade
commit
c53bbeaf95
@ -2038,6 +2038,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
G()->set_option_string("weather_bot_username", get_json_value_string(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
if (key == "bot_preview_medias_max") {
|
||||
G()->set_option_integer("bot_media_preview_count_max", get_json_value_int(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
|
||||
new_values.push_back(std::move(key_value));
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ class ConfigManager final : public NetQueryCallback {
|
||||
|
||||
private:
|
||||
struct AppConfig {
|
||||
static constexpr int32 CURRENT_VERSION = 51;
|
||||
static constexpr int32 CURRENT_VERSION = 52;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
@ -154,6 +154,7 @@ OptionManager::OptionManager(Td *td)
|
||||
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);
|
||||
set_default_integer_option("bot_media_preview_count_max", 12);
|
||||
|
||||
if (options.isset("my_phone_number") || !options.isset("my_id")) {
|
||||
update_premium_options();
|
||||
|
Loading…
Reference in New Issue
Block a user