Skip to content

Commit 322711a

Browse files
author
Isaac
committed
Fix share text from external
(cherry picked from commit d3d6e41)
1 parent b432800 commit 322711a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

submodules/TelegramCore/Sources/PendingMessages/StandaloneSendMessage.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,22 @@ private func sendUploadedMultiMessageContent(
561561
attributes: [MessageAttribute],
562562
threadId: Int64?
563563
) -> Signal<Never, StandaloneSendMessagesError> {
564+
if content.count == 1, case let .text(text) = content[0].content {
565+
return sendUploadedMessageContent(
566+
auxiliaryMethods: auxiliaryMethods,
567+
postbox: postbox,
568+
network: network,
569+
stateManager: stateManager,
570+
accountPeerId: stateManager.accountPeerId,
571+
peerId: peerId,
572+
content: content[0],
573+
text: text,
574+
attributes: attributes,
575+
media: [],
576+
threadId: threadId
577+
)
578+
}
579+
564580
return postbox.transaction { transaction -> Signal<Never, StandaloneSendMessagesError> in
565581
if let peer = transaction.getPeer(peerId), let inputPeer = apiInputPeer(peer) {
566582
//var forwardSourceInfoAttribute: ForwardSourceInfoAttribute?

0 commit comments

Comments
 (0)