diff options
| author | levlam <levlam@telegram.org> | 2026-03-13 18:12:59 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2026-03-13 18:12:59 +0300 |
| commit | 758423ab22faf282e643aef01d891a674f2e6019 (patch) | |
| tree | 316b455c6852c87deff41298eb85512d1da863c2 | |
| parent | 29c6b790a3bda208c88c4042892d2d8dabcb0dc5 (diff) | |
Add the option "audio_search_bot_username".
| -rw-r--r-- | td/telegram/ConfigManager.cpp | 11 | ||||
| -rw-r--r-- | td/telegram/ConfigManager.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 66d5721f5..dfaedd047 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1361,6 +1361,7 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c string whitelisted_bots; string ton_stakedice_stake_suggested_amounts; string gift_craft_probabilities; + string music_search_username; // {"stories_all_hidden", "archive_all_stories"} static const FlatHashMap<Slice, Slice, SliceHash> bool_keys = { @@ -2034,6 +2035,10 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c } continue; } + if (key == "music_search_username") { + music_search_username = get_json_value_string(std::move(key_value->value_), key); + continue; + } new_values.push_back(std::move(key_value)); } @@ -2080,6 +2085,12 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c } options.set_option_string("whitelisted_bots", whitelisted_bots); + if (music_search_username.empty()) { + options.set_option_empty("audio_search_bot_username"); + } else { + G()->set_option_string("audio_search_bot_username", music_search_username); + } + if (!dice_emojis.empty()) { vector<string> dice_success_values(dice_emojis.size()); for (auto &it : dice_emoji_success_value) { diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index d2f71b723..7f1b72172 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -77,7 +77,7 @@ class ConfigManager final : public NetQueryCallback { private: struct AppConfig { - static constexpr int32 CURRENT_VERSION = 115; + static constexpr int32 CURRENT_VERSION = 116; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr<telegram_api::JSONValue> config_; |
