diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 1d87fb4e9..2fa00aad0 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4656,6 +4656,9 @@ internalLinkTypeChangePhoneNumber = InternalLinkType; //@description The link is an invite link to a chat folder. Call checkChatFolderInviteLink with the given invite link to process the link @invite_link Internal representation of the invite link internalLinkTypeChatFolderInvite invite_link:string = InternalLinkType; +//@description The link is a link to the folder section of the app settings +internalLinkTypeChatFolderSettings = InternalLinkType; + //@description The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link @invite_link Internal representation of the invite link internalLinkTypeChatInvite invite_link:string = InternalLinkType; @@ -4665,9 +4668,6 @@ internalLinkTypeDefaultMessageAutoDeleteTimerSettings = InternalLinkType; //@description The link is a link to the edit profile section of the app settings internalLinkTypeEditProfileSettings = InternalLinkType; -//@description The link is a link to the folder section of the app settings -internalLinkTypeFolderSettings = InternalLinkType; - //@description The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame //@bot_username Username of the bot that owns the game //@game_short_name Short name of the game diff --git a/td/telegram/LinkManager.cpp b/td/telegram/LinkManager.cpp index c390a43d2..2450d3a5c 100644 --- a/td/telegram/LinkManager.cpp +++ b/td/telegram/LinkManager.cpp @@ -396,9 +396,9 @@ class LinkManager::InternalLinkEditProfileSettings final : public InternalLink { } }; -class LinkManager::InternalLinkFolderSettings final : public InternalLink { +class LinkManager::InternalLinkDialogFolderSettings final : public InternalLink { td_api::object_ptr get_internal_link_type_object() const final { - return td_api::make_object(); + return td_api::make_object(); } }; @@ -1273,7 +1273,7 @@ unique_ptr LinkManager::parse_tg_link_query(Slice que } if (path.size() == 2 && path[1] == "folders") { // settings/folders - return td::make_unique(); + return td::make_unique(); } if (path.size() == 2 && path[1] == "language") { // settings/language @@ -1893,7 +1893,7 @@ Result LinkManager::get_internal_link_impl(const td_api::InternalLinkTyp return Status::Error("HTTP link is unavailable for the link type"); } return "tg://settings/edit_profile"; - case td_api::internalLinkTypeFolderSettings::ID: + case td_api::internalLinkTypeChatFolderSettings::ID: if (!is_internal) { return Status::Error("HTTP link is unavailable for the link type"); } diff --git a/td/telegram/LinkManager.h b/td/telegram/LinkManager.h index aeabda888..0620815d9 100644 --- a/td/telegram/LinkManager.h +++ b/td/telegram/LinkManager.h @@ -125,9 +125,9 @@ class LinkManager final : public Actor { class InternalLinkConfirmPhone; class InternalLinkDefaultMessageAutoDeleteTimerSettings; class InternalLinkDialogFolderInvite; + class InternalLinkDialogFolderSettings; class InternalLinkDialogInvite; class InternalLinkEditProfileSettings; - class InternalLinkFolderSettings; class InternalLinkGame; class InternalLinkInstantView; class InternalLinkInvoice; diff --git a/test/link.cpp b/test/link.cpp index 30bc9e9cc..18134c52e 100644 --- a/test/link.cpp +++ b/test/link.cpp @@ -222,6 +222,10 @@ static auto chat_folder_invite(const td::string &slug) { return td::td_api::make_object("tg:list?slug=" + slug); } +static auto chat_folder_settings() { + return td::td_api::make_object(); +} + static auto chat_invite(const td::string &hash) { return td::td_api::make_object("tg:join?invite=" + hash); } @@ -234,10 +238,6 @@ static auto edit_profile_settings() { return td::td_api::make_object(); } -static auto folder_settings() { - return td::td_api::make_object(); -} - static auto game(const td::string &bot_username, const td::string &game_short_name) { return td::td_api::make_object(bot_username, game_short_name); } @@ -1145,7 +1145,7 @@ TEST(Link, parse_internal_link_part4) { parse_internal_link("tg://settings/devices", active_sessions()); parse_internal_link("tg://settings/change_number", change_phone_number()); parse_internal_link("tg://settings/edit_profile", edit_profile_settings()); - parse_internal_link("tg://settings/folders", folder_settings()); + parse_internal_link("tg://settings/folders", chat_folder_settings()); parse_internal_link("tg://settings/filters", settings()); parse_internal_link("tg://settings/language", language_settings()); parse_internal_link("tg://settings/privacy", privacy_and_security_settings());