mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 16:45:19 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user