diff --git a/bitchat.xcodeproj/project.pbxproj b/bitchat.xcodeproj/project.pbxproj index 3f73c5c9..be216ccb 100644 --- a/bitchat.xcodeproj/project.pbxproj +++ b/bitchat.xcodeproj/project.pbxproj @@ -1064,7 +1064,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.3.3; + MARKETING_VERSION = 1.3.4; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat.ShareExtension; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1095,7 +1095,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.3; + MARKETING_VERSION = 1.3.4; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = iphoneos; @@ -1150,7 +1150,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.3.3; + MARKETING_VERSION = 1.3.4; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat; PRODUCT_NAME = bitchat; SDKROOT = iphoneos; @@ -1364,7 +1364,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.3.3; + MARKETING_VERSION = 1.3.4; PRODUCT_BUNDLE_IDENTIFIER = chat.bitchat.ShareExtension; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/bitchat/ViewModels/ChatViewModel.swift b/bitchat/ViewModels/ChatViewModel.swift index f5f8f2a8..1de69579 100644 --- a/bitchat/ViewModels/ChatViewModel.swift +++ b/bitchat/ViewModels/ChatViewModel.swift @@ -530,23 +530,23 @@ class ChatViewModel: ObservableObject, BitchatDelegate { // Start mesh service immediately meshService.startServices() - // Announce Tor status to the chat timeline as early as possible + // Announce Tor status (geohash-only; do not show in mesh chat) if TorManager.shared.torEnforced && !torStatusAnnounced { torStatusAnnounced = true - addPublicSystemMessage("starting tor...") + addGeohashOnlySystemMessage("starting tor...") // Suppress incremental Tor progress messages; only show initial start and readiness. torProgressCancellable = nil Task.detached { let ready = await TorManager.shared.awaitReady() Task { @MainActor [weak self] in guard let self else { return } - if ready { self.addPublicSystemMessage("tor started. routing all chats via tor for privacy.") } - else { self.addPublicSystemMessage("still waiting for tor to start...") } + if ready { self.addGeohashOnlySystemMessage("tor started. routing all chats via tor for privacy.") } + else { self.addGeohashOnlySystemMessage("still waiting for tor to start...") } } } } else if !TorManager.shared.torEnforced && !torStatusAnnounced { torStatusAnnounced = true - addPublicSystemMessage("development build: tor bypass enabled.") + addGeohashOnlySystemMessage("development build: tor bypass enabled.") } // Initialize Nostr services @@ -4919,6 +4919,14 @@ class ChatViewModel: ObservableObject, BitchatDelegate { } objectWillChange.send() } + + /// Add a system message only if viewing a geohash location channel (never post to mesh). + @MainActor + func addGeohashOnlySystemMessage(_ content: String) { + if case .location = activeChannel { + addPublicSystemMessage(content) + } + } // Send a public message without adding a local user echo. // Used for emotes where we want a local system-style confirmation instead. @MainActor