From 63f0bd38d0f209f4fe3c9dc76bd4eac9d4aa21c9 Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 3 Sep 2024 23:01:52 +0800 Subject: [PATCH 1/2] Fix send as (cherry picked from commit 945525057159e7ad8c33c218075b862599bdb8fe) --- .../Sources/PendingMessages/EnqueueMessage.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift b/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift index 14556bc594..7cafce774d 100644 --- a/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift +++ b/submodules/TelegramCore/Sources/PendingMessages/EnqueueMessage.swift @@ -716,10 +716,14 @@ func enqueueMessages(transaction: Transaction, account: Account, peerId: PeerId, var authorId: PeerId? if let sendAsPeer = sendAsPeer { - if let peer = peer as? TelegramChannel, case let .broadcast(info) = peer.info, info.flags.contains(.messagesShouldHaveProfiles) { - authorId = sendAsPeer.id + if let peer = peer as? TelegramChannel, case let .broadcast(info) = peer.info { + if info.flags.contains(.messagesShouldHaveProfiles) { + authorId = sendAsPeer.id + } else { + authorId = peer.id + } } else { - authorId = peer.id + authorId = sendAsPeer.id } } else if let peer = peer as? TelegramChannel { if case .broadcast = peer.info { From 3aceee1696a890b54508bc1ecf472e3acfea550f Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Wed, 4 Sep 2024 00:41:17 +0800 Subject: [PATCH 2/2] Remove people nearby menu option --- .../ContactListUI/Sources/ContactsController.swift | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/submodules/ContactListUI/Sources/ContactsController.swift b/submodules/ContactListUI/Sources/ContactsController.swift index 1204cd5b39..4d28125285 100644 --- a/submodules/ContactListUI/Sources/ContactsController.swift +++ b/submodules/ContactListUI/Sources/ContactsController.swift @@ -787,17 +787,6 @@ public class ContactsController: ViewController { }) }))) - items.append(.action(ContextMenuActionItem(text: self.presentationData.strings.Contacts_AddPeopleNearby, icon: { theme in - return generateTintedImage(image: UIImage(bundleImageName: "Contact List/Context Menu/PeopleNearby"), color: theme.contextMenu.primaryColor) - }, action: { [weak self] c, f in - c?.dismiss(completion: { [weak self] in - guard let strongSelf = self else { - return - } - strongSelf.contactsNode.openPeopleNearby?() - }) - }))) - let controller = ContextController(presentationData: self.presentationData, source: .extracted(ContactsTabBarContextExtractedContentSource(controller: self, sourceNode: sourceNode)), items: .single(ContextController.Items(content: .list(items))), recognizer: nil, gesture: gesture) self.context.sharedContext.mainWindow?.presentInGlobalOverlay(controller) }