From d3d6e415de765059b19a44327108fbc304b5708b Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Fri, 6 Dec 2024 22:14:55 +0800 Subject: [PATCH] Fix share text from external --- .../PendingMessages/StandaloneSendMessage.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift b/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift index 74de9a9aaa..3e323e97b8 100644 --- a/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift +++ b/submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift @@ -561,6 +561,22 @@ private func sendUploadedMultiMessageContent( attributes: [MessageAttribute], threadId: Int64? ) -> Signal { + if content.count == 1, case let .text(text) = content[0].content { + return sendUploadedMessageContent( + auxiliaryMethods: auxiliaryMethods, + postbox: postbox, + network: network, + stateManager: stateManager, + accountPeerId: stateManager.accountPeerId, + peerId: peerId, + content: content[0], + text: text, + attributes: attributes, + media: [], + threadId: threadId + ) + } + return postbox.transaction { transaction -> Signal in if let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) { //var forwardSourceInfoAttribute: ForwardSourceInfoAttribute?