Add "chat_available_reaction_count_max" option.
This commit is contained in:
parent
45eca4e8d2
commit
91013ee921
|
@ -1495,10 +1495,9 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
|||
telegram_api::JSONValue *value = key_value->value_.get();
|
||||
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 == "stories_export_nopublic_link" || key == "test" || key == "upload_max_fileparts_default" ||
|
||||
key == "upload_max_fileparts_premium" || key == "wallet_blockchain_name" || key == "wallet_config" ||
|
||||
key == "wallet_enabled") {
|
||||
key == "stickers_emoji_cache_time" || key == "stories_export_nopublic_link" || key == "test" ||
|
||||
key == "upload_max_fileparts_default" || key == "upload_max_fileparts_premium" ||
|
||||
key == "wallet_blockchain_name" || key == "wallet_config" || key == "wallet_enabled") {
|
||||
continue;
|
||||
}
|
||||
if (key == "ignore_restriction_reasons") {
|
||||
|
@ -1971,6 +1970,11 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
|||
G()->set_option_integer("chat_boost_level_max", max(0, get_json_value_int(std::move(key_value->value_), key)));
|
||||
continue;
|
||||
}
|
||||
if (key == "reactions_in_chat_max") {
|
||||
G()->set_option_integer("chat_available_reaction_count_max",
|
||||
get_json_value_int(std::move(key_value->value_), key));
|
||||
continue;
|
||||
}
|
||||
|
||||
new_values.push_back(std::move(key_value));
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback {
|
|||
|
||||
private:
|
||||
struct AppConfig {
|
||||
static constexpr int32 CURRENT_VERSION = 26;
|
||||
static constexpr int32 CURRENT_VERSION = 27;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
|
|
@ -153,6 +153,9 @@ OptionManager::OptionManager(Td *td)
|
|||
if (!have_option("chat_boost_level_max")) {
|
||||
set_option_integer("chat_boost_level_max", G()->is_test_dc() ? 10 : 100);
|
||||
}
|
||||
if (!have_option("chat_available_reaction_count_max")) {
|
||||
set_option_integer("chat_available_reaction_count_max", 100);
|
||||
}
|
||||
|
||||
update_premium_options();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user