From 3c50e06dccd892daac7ee7ea54fa854610927914 Mon Sep 17 00:00:00 2001 From: Ireina <140869597+re-zero001@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:21:06 +0800 Subject: [PATCH] fix: copy summary text instead of original when summary is shown --- Telegram/SourceFiles/history/history_item_text.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/history/history_item_text.cpp b/Telegram/SourceFiles/history/history_item_text.cpp index ba35168cfe..12b27302a5 100644 --- a/Telegram/SourceFiles/history/history_item_text.cpp +++ b/Telegram/SourceFiles/history/history_item_text.cpp @@ -16,7 +16,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lang/lang_keys.h" #include "ui/text/text_options.h" +// AyuGram includes +#include "api/api_transcribes.h" + + TextForMimeData HistoryItemText(not_null item) { + const auto &summary = item->summaryEntry(); + if (!summary.result.empty() && summary.shown) { + return TextForMimeData::WithExpandedLinks(summary.result); + } + const auto media = item->media(); auto mediaResult = media ? media->clipboardText() : TextForMimeData();