Add internal option "weather_bot_username".

This commit is contained in:
levlam 2024-07-17 16:40:12 +03:00
parent 6d5d9a19aa
commit 9281efa3f0
3 changed files with 6 additions and 1 deletions

View File

@ -2034,6 +2034,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
}
continue;
}
if (key == "weather_search_username") {
G()->set_option_string("weather_bot_username", get_json_value_string(std::move(key_value->value_), key));
continue;
}
new_values.push_back(std::move(key_value));
}

View File

@ -85,7 +85,7 @@ class ConfigManager final : public NetQueryCallback {
private:
struct AppConfig {
static constexpr int32 CURRENT_VERSION = 50;
static constexpr int32 CURRENT_VERSION = 51;
int32 version_ = 0;
int32 hash_ = 0;
telegram_api::object_ptr<telegram_api::JSONValue> config_;

View File

@ -453,6 +453,7 @@ bool OptionManager::is_internal_option(Slice name) {
"story_expiring_limit_premium",
"upload_premium_speedup_notify_period",
"video_note_size_max",
"weather_bot_username",
"webfile_dc_id"};
return internal_options.count(name) > 0;
}