From 6bcd7c99001631d4f427a55e2645950e20306d7e Mon Sep 17 00:00:00 2001 From: RadRussianRus Date: Sun, 11 Sep 2022 05:16:24 +0300 Subject: [PATCH] [Improvement] Do not strip links in bio --- Telegram/SourceFiles/info/profile/info_profile_values.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/info/profile/info_profile_values.cpp b/Telegram/SourceFiles/info/profile/info_profile_values.cpp index ae75a602c..d1b939041 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_values.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_values.cpp @@ -56,6 +56,7 @@ auto PlainUsernameValue(not_null peer) { }); } +/* void StripExternalLinks(TextWithEntities &text) { const auto local = [](const QString &url) { return !UrlRequiresConfirmation(QUrl::fromUserInput(url)); @@ -73,6 +74,7 @@ void StripExternalLinks(TextWithEntities &text) { ranges::remove_if(text.entities, notLocal), text.entities.end()); } +*/ } // namespace @@ -159,6 +161,7 @@ TextWithEntities AboutWithEntities( } else if (isBot) { flags |= TextParseHashtags | TextParseBotCommands; } + /* const auto stripExternal = peer->isChat() || peer->isMegagroup() || (user && !isBot && !isPremium); @@ -167,11 +170,14 @@ TextWithEntities AboutWithEntities( const auto used = (!user || isPremium || value.size() <= limit) ? value : value.mid(0, limit) + "..."; + */ auto result = TextWithEntities{ value }; TextUtilities::ParseEntities(result, flags); + /* if (stripExternal) { StripExternalLinks(result); } + */ return result; }