[Improvement] Do not strip links in bio

This commit is contained in:
Eric Kotato 2022-09-11 05:16:24 +03:00 committed by Eric Kotato
parent a035ca6e3c
commit 7a23b3b1ae

View file

@ -75,6 +75,7 @@ auto PlainPrimaryUsernameValue(not_null<PeerData*> peer) {
}) | rpl::flatten_latest();
}
/*
void StripExternalLinks(TextWithEntities &text) {
const auto local = [](const QString &url) {
return !UrlRequiresConfirmation(QUrl::fromUserInput(url));
@ -92,6 +93,7 @@ void StripExternalLinks(TextWithEntities &text) {
ranges::remove_if(text.entities, notLocal),
text.entities.end());
}
*/
} // namespace
@ -240,14 +242,18 @@ TextWithEntities AboutWithEntities(
} else if (isBot) {
flags |= TextParseHashtags | TextParseBotCommands;
}
/*
const auto stripExternal = peer->isChat()
|| peer->isMegagroup()
|| (user && !isBot && !isPremium);
*/
auto result = TextWithEntities{ value };
TextUtilities::ParseEntities(result, flags);
/*
if (stripExternal) {
StripExternalLinks(result);
}
*/
return result;
}