Support "stories_venue_search_username" appConfig option.
This commit is contained in:
parent
0ba15e33dd
commit
0f39a16321
@ -1380,10 +1380,12 @@ void ConfigManager::process_config(tl_object_ptr<telegram_api::config> config) {
|
||||
} else {
|
||||
options.set_option_string("animation_search_bot_username", config->gif_search_username_);
|
||||
}
|
||||
if (config->venue_search_username_.empty()) {
|
||||
options.set_option_empty("venue_search_bot_username");
|
||||
} else {
|
||||
options.set_option_string("venue_search_bot_username", config->venue_search_username_);
|
||||
if (!options.have_option("venue_search_bot_username")) {
|
||||
if (config->venue_search_username_.empty()) {
|
||||
options.set_option_empty("venue_search_bot_username");
|
||||
} else {
|
||||
options.set_option_string("venue_search_bot_username", config->venue_search_username_);
|
||||
}
|
||||
}
|
||||
if (config->img_search_username_.empty()) {
|
||||
options.set_option_empty("photo_search_bot_username");
|
||||
@ -1886,6 +1888,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
stories_changelog_user_id = get_json_value_long(std::move(key_value->value_), key);
|
||||
continue;
|
||||
}
|
||||
if (key == "stories_venue_search_username") {
|
||||
G()->set_option_string("venue_search_bot_username", get_json_value_string(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 = 8;
|
||||
static constexpr int32 CURRENT_VERSION = 9;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
Loading…
Reference in New Issue
Block a user