Remove dead code and simplify codebase

- Remove unused BinaryEncodable protocol and BinaryMessageType enum
- Delete MockNoiseSession.swift (never used in tests)
- Remove all relay detection code (hardcoded to false)
  - Removed isRelayConnected property from BitchatPeer
  - Removed relayConnected case from ConnectionState enum
  - Cleaned up relay-related UI indicators in ContentView
  - Removed relay status checks from ChatViewModel
- Simplified peer connection logic by removing relay layer

Total: 169 lines removed across 5 files
This commit is contained in:
jack
2025-08-12 11:03:31 +02:00
parent 63f05b5d7e
commit f4b8168ef9
5 changed files with 11 additions and 169 deletions
+1 -1
View File
@@ -859,7 +859,7 @@ class ChatViewModel: ObservableObject, BitchatDelegate {
// Check if this is a moon peer (we favorite them but they don't favorite us) AND they're offline
// Only require mutual favorites for offline Nostr messaging
if let peer = peerIndex[peerID],
peer.isFavorite && !peer.theyFavoritedUs && !peer.isConnected && !peer.isRelayConnected {
peer.isFavorite && !peer.theyFavoritedUs && !peer.isConnected {
addSystemMessage("cannot start chat with \(peerNickname): mutual favorite required for offline messaging.")
return
}