From 323c2a6aa50f195048205be2073d57c2be2cc085 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 15 Jul 2022 17:59:44 +0300 Subject: [PATCH] Don't send custom emoji links to generate previews. --- Telegram/SourceFiles/chat_helpers/message_field.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/chat_helpers/message_field.cpp b/Telegram/SourceFiles/chat_helpers/message_field.cpp index 9df0eaa4cf..772736a795 100644 --- a/Telegram/SourceFiles/chat_helpers/message_field.cpp +++ b/Telegram/SourceFiles/chat_helpers/message_field.cpp @@ -618,7 +618,8 @@ void MessageLinksParser::parse() { Expects(tag != tagsEnd); if (Ui::InputField::IsValidMarkdownLink(tag->id) - && !TextUtilities::IsMentionLink(tag->id)) { + && !TextUtilities::IsMentionLink(tag->id) + && !Ui::InputField::IsCustomEmojiLink(tag->id)) { ranges.push_back({ tag->offset, tag->length, tag->id }); } ++tag;