Add options related to stealth mode.
This commit is contained in:
parent
8c7076fe97
commit
086df4db4e
@ -1892,6 +1892,21 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
|||||||
G()->set_option_string("venue_search_bot_username", get_json_value_string(std::move(key_value->value_), key));
|
G()->set_option_string("venue_search_bot_username", get_json_value_string(std::move(key_value->value_), key));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (key == "stories_stealth_past_period") {
|
||||||
|
G()->set_option_integer("story_stealth_mode_past_period",
|
||||||
|
get_json_value_int(std::move(key_value->value_), key));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (key == "stories_stealth_future_period") {
|
||||||
|
G()->set_option_integer("story_stealth_mode_future_period",
|
||||||
|
get_json_value_int(std::move(key_value->value_), key));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (key == "stories_stealth_cooldown_period") {
|
||||||
|
G()->set_option_integer("story_stealth_mode_cooldown_period",
|
||||||
|
get_json_value_int(std::move(key_value->value_), key));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
new_values.push_back(std::move(key_value));
|
new_values.push_back(std::move(key_value));
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
struct AppConfig {
|
struct AppConfig {
|
||||||
static constexpr int32 CURRENT_VERSION = 9;
|
static constexpr int32 CURRENT_VERSION = 10;
|
||||||
int32 version_ = 0;
|
int32 version_ = 0;
|
||||||
int32 hash_ = 0;
|
int32 hash_ = 0;
|
||||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||||
|
@ -118,6 +118,15 @@ OptionManager::OptionManager(Td *td)
|
|||||||
if (!have_option("archive_all_stories")) {
|
if (!have_option("archive_all_stories")) {
|
||||||
// set_option_boolean("archive_all_stories", false);
|
// set_option_boolean("archive_all_stories", false);
|
||||||
}
|
}
|
||||||
|
if (!have_option("story_stealth_mode_past_period")) {
|
||||||
|
set_option_integer("story_stealth_mode_past_period", 300);
|
||||||
|
}
|
||||||
|
if (!have_option("story_stealth_mode_future_period")) {
|
||||||
|
set_option_integer("story_stealth_mode_future_period", 1500);
|
||||||
|
}
|
||||||
|
if (!have_option("story_stealth_mode_cooldown_period")) {
|
||||||
|
set_option_integer("story_stealth_mode_cooldown_period", 3600);
|
||||||
|
}
|
||||||
|
|
||||||
set_option_empty("archive_and_mute_new_chats_from_unknown_users");
|
set_option_empty("archive_and_mute_new_chats_from_unknown_users");
|
||||||
set_option_empty("chat_filter_count_max");
|
set_option_empty("chat_filter_count_max");
|
||||||
|
Loading…
Reference in New Issue
Block a user