diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 78190ba04..402c40f43 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -2151,7 +2151,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c } if (story_viewers_expire_period >= 0) { - options.set_option_integer("story_viewers_expire_period", story_viewers_expire_period); + options.set_option_integer("story_viewers_expiration_delay", story_viewers_expire_period); } if (!options.get_option_boolean("need_synchronize_archive_all_stories")) { @@ -2163,6 +2163,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c options.set_option_empty("default_ton_blockchain_config"); options.set_option_empty("default_ton_blockchain_name"); + options.set_option_empty("story_viewers_expire_period"); // do not update suggested actions while changing content settings or dismissing an action if (!is_set_content_settings_request_sent_ && dismiss_suggested_action_request_count_ == 0) { diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 89233321f..ac8e6ac02 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -296,7 +296,7 @@ bool OptionManager::is_internal_option(Slice name) { name == "saved_gifs_limit_premium" || name == "session_count" || name == "since_last_open" || name == "stickers_faved_limit_default" || name == "stickers_faved_limit_premium" || name == "stickers_normal_by_emoji_per_premium_num" || name == "stickers_premium_by_emoji_num" || - name == "stories_changelog_user_id" || name == "story_viewers_expire_period"; + name == "stories_changelog_user_id"; case 'v': return name == "video_note_size_max"; case 'w': diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index c3f9b19a9..ad96d370f 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -969,7 +969,7 @@ bool StoryManager::is_active_story(const Story *story) { int32 StoryManager::get_story_viewers_expire_date(const Story *story) const { return story->expire_date_ + - narrow_cast(td_->option_manager_->get_option_integer("story_viewers_expire_period", 86400)); + narrow_cast(td_->option_manager_->get_option_integer("story_viewers_expiration_delay", 86400)); } const StoryManager::Story *StoryManager::get_story(StoryFullId story_full_id) const {