From 021af3a22dd0ef28acb88a3210b81072253a700e Mon Sep 17 00:00:00 2001 From: jack <212554440+jackjackbits@users.noreply.github.com> Date: Wed, 8 Jul 2026 23:04:30 +0200 Subject: [PATCH] Remove write-only peerNostrPubkey left by the read-receipt gate removal (#1417) The variable only fed the deleted guard (#1415); the favorites lookup in the unified-peer branch existed solely to populate it. Co-authored-by: jack Co-authored-by: Claude Fable 5 --- bitchat/ViewModels/ChatLifecycleCoordinator.swift | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bitchat/ViewModels/ChatLifecycleCoordinator.swift b/bitchat/ViewModels/ChatLifecycleCoordinator.swift index bbcde713..05831407 100644 --- a/bitchat/ViewModels/ChatLifecycleCoordinator.swift +++ b/bitchat/ViewModels/ChatLifecycleCoordinator.swift @@ -215,16 +215,12 @@ final class ChatLifecycleCoordinator { } var noiseKeyHex: PeerID? - var peerNostrPubkey: String? if let noiseKey = Data(hexString: peerID.id), - let favoriteStatus = context.favoriteRelationship(forNoiseKey: noiseKey) { + context.favoriteRelationship(forNoiseKey: noiseKey) != nil { noiseKeyHex = peerID - peerNostrPubkey = favoriteStatus.peerNostrPublicKey } else if let peer = context.unifiedPeer(for: peerID) { noiseKeyHex = PeerID(hexData: peer.noisePublicKey) - let favoriteStatus = context.favoriteRelationship(forNoiseKey: peer.noisePublicKey) - peerNostrPubkey = favoriteStatus?.peerNostrPublicKey if let noiseKeyHex, context.unreadPrivateMessages.contains(noiseKeyHex) { context.markPrivateChatRead(noiseKeyHex)