From 23387d662575928d8cb1dbf4f185cd8148a0f9b2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 9 Jan 2023 09:10:53 +0400 Subject: [PATCH] Don't drag-n-drop "internal:" URLs. --- Telegram/SourceFiles/core/click_handler_types.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/core/click_handler_types.cpp b/Telegram/SourceFiles/core/click_handler_types.cpp index 906d11b03a..6f080e06d5 100644 --- a/Telegram/SourceFiles/core/click_handler_types.cpp +++ b/Telegram/SourceFiles/core/click_handler_types.cpp @@ -93,7 +93,8 @@ QString HiddenUrlClickHandler::copyToClipboardContextItemText() const { } QString HiddenUrlClickHandler::dragText() const { - return HiddenUrlClickHandler::copyToClipboardText(); + const auto result = HiddenUrlClickHandler::copyToClipboardText(); + return result.startsWith(u"internal:"_q) ? QString() : result; } void HiddenUrlClickHandler::Open(QString url, QVariant context) {