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 <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jack
2026-07-08 23:04:30 +02:00
committed by GitHub
co-authored by jack Claude Fable 5
parent 8c9c1cc6ac
commit 021af3a22d
@@ -215,16 +215,12 @@ final class ChatLifecycleCoordinator {
} }
var noiseKeyHex: PeerID? var noiseKeyHex: PeerID?
var peerNostrPubkey: String?
if let noiseKey = Data(hexString: peerID.id), if let noiseKey = Data(hexString: peerID.id),
let favoriteStatus = context.favoriteRelationship(forNoiseKey: noiseKey) { context.favoriteRelationship(forNoiseKey: noiseKey) != nil {
noiseKeyHex = peerID noiseKeyHex = peerID
peerNostrPubkey = favoriteStatus.peerNostrPublicKey
} else if let peer = context.unifiedPeer(for: peerID) { } else if let peer = context.unifiedPeer(for: peerID) {
noiseKeyHex = PeerID(hexData: peer.noisePublicKey) noiseKeyHex = PeerID(hexData: peer.noisePublicKey)
let favoriteStatus = context.favoriteRelationship(forNoiseKey: peer.noisePublicKey)
peerNostrPubkey = favoriteStatus?.peerNostrPublicKey
if let noiseKeyHex, context.unreadPrivateMessages.contains(noiseKeyHex) { if let noiseKeyHex, context.unreadPrivateMessages.contains(noiseKeyHex) {
context.markPrivateChatRead(noiseKeyHex) context.markPrivateChatRead(noiseKeyHex)