From f543c2569e0177db540fe221f312865b20a67bde Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 19 Apr 2026 23:06:28 +0700 Subject: [PATCH] Don't offer sending text as file if hasImage. --- Telegram/SourceFiles/ui/controls/compose_ai_button_factory.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/ui/controls/compose_ai_button_factory.cpp b/Telegram/SourceFiles/ui/controls/compose_ai_button_factory.cpp index ed640d242b..b4b7b28189 100644 --- a/Telegram/SourceFiles/ui/controls/compose_ai_button_factory.cpp +++ b/Telegram/SourceFiles/ui/controls/compose_ai_button_factory.cpp @@ -84,6 +84,9 @@ int SendAsFilePasteThreshold() { LargeTextPasteResult CheckLargeTextPaste( not_null field, not_null data) { + if (data->hasImage()) { + return {}; + } const auto pasteText = Core::ReadMimeText(data); if (pasteText.isEmpty()) { return {};