diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 5e1ff04f8..d7de3fd31 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -6855,7 +6855,7 @@ checkChatFolderInviteLink invite_link:string = ChatFolderInviteLinkInfo; //@description Adds a chat folder by an invite link @invite_link Invite link for the chat folder @chat_ids Identifiers of the chats added to the chat folder. The chats are automatically joined if they aren't joined yet addChatFolderByInviteLink invite_link:string chat_ids:vector = Ok; -//@description Returns new chats added to a shareable chat folder by its owner. The method should be called at most once in five minutes for the given chat folder @chat_folder_id Chat folder identifier +//@description Returns new chats added to a shareable chat folder by its owner. The method should be called at most once in getOption("chat_folder_new_chats_update_period") for the given chat folder @chat_folder_id Chat folder identifier getChatFolderNewChats chat_folder_id:int32 = Chats; //@description Adds new chats added to a shareable chat folder by its owner to the user's chat folder @chat_folder_id Chat folder identifier @chat_ids Identifiers of the new chats added to the chat folder. The chats are automatically joined if they aren't joined yet diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 8be6a4675..0af74173e 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1551,6 +1551,7 @@ void ConfigManager::process_app_config(tl_object_ptr &c vector fragment_prefixes; bool premium_gift_attach_menu_icon = false; bool premium_gift_text_field_icon = false; + int32 dialog_filter_update_period = 300; if (config->get_id() == telegram_api::jsonObject::ID) { for (auto &key_value : static_cast(config.get())->value_) { Slice key = key_value->key_; @@ -1943,6 +1944,10 @@ void ConfigManager::process_app_config(tl_object_ptr &c premium_gift_text_field_icon = get_json_value_bool(std::move(key_value->value_), key); continue; } + if (key == "chatlist_update_period") { + dialog_filter_update_period = get_json_value_int(std::move(key_value->value_), key); + continue; + } new_values.push_back(std::move(key_value)); } @@ -2034,6 +2039,9 @@ void ConfigManager::process_app_config(tl_object_ptr &c if (telegram_antispam_group_size_min >= 0) { options.set_option_integer("aggressive_anti_spam_supergroup_member_count_min", telegram_antispam_group_size_min); } + if (dialog_filter_update_period > 0) { + options.set_option_integer("chat_folder_new_chats_update_period", dialog_filter_update_period); + } bool is_premium = options.get_option_boolean("is_premium"); if (is_premium) {