From 615ddd71e52a5008dfe52a51876a3cb2446cff6a Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 21 Jul 2023 16:38:24 +0300 Subject: [PATCH] Support changes to "story_caption_length_max" option. --- td/telegram/ConfigManager.cpp | 4 ++++ td/telegram/OptionManager.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 5830cd4c2..49b75598d 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1986,6 +1986,8 @@ void ConfigManager::process_app_config(tl_object_ptr &c options.set_option_integer("chat_folder_count_max", options.get_option_integer("dialog_filters_limit_premium", 20)); options.set_option_integer("chat_folder_chosen_chat_count_max", options.get_option_integer("dialog_filters_chats_limit_premium", 200)); + options.set_option_integer("story_caption_length_max", + options.get_option_integer("story_caption_length_limit_premium", 2048)); options.set_option_integer("bio_length_max", options.get_option_integer("about_length_limit_premium", 140)); options.set_option_integer("saved_animations_limit", options.get_option_integer("saved_gifs_limit_premium", 400)); options.set_option_integer("favorite_stickers_limit", @@ -2002,6 +2004,8 @@ void ConfigManager::process_app_config(tl_object_ptr &c options.set_option_integer("chat_folder_count_max", options.get_option_integer("dialog_filters_limit_default", 10)); options.set_option_integer("chat_folder_chosen_chat_count_max", options.get_option_integer("dialog_filters_chats_limit_default", 100)); + options.set_option_integer("story_caption_length_max", + options.get_option_integer("story_caption_length_limit_default", 200)); options.set_option_integer("bio_length_max", options.get_option_integer("about_length_limit_default", 70)); options.set_option_integer("saved_animations_limit", options.get_option_integer("saved_gifs_limit_default", 200)); options.set_option_integer("favorite_stickers_limit", diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 6513a55c3..111905ba2 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -80,7 +80,7 @@ OptionManager::OptionManager(Td *td) set_option_integer("message_caption_length_max", 1024); } if (!have_option("story_caption_length_max")) { - set_option_integer("story_caption_length_max", 2048); + set_option_integer("story_caption_length_max", 200); } if (!have_option("bio_length_max")) { set_option_integer("bio_length_max", 70);