mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 09:05:20 +00:00
Fix lazy handshake behavior and re-enable cover traffic (#323)
* Add encryption export compliance to Info.plist
Set ITSAppUsesNonExemptEncryption to false for TestFlight submission
* Revert "Add encryption export compliance to Info.plist"
This reverts commit 2cfbb1679d.
* fix: prevent spurious handshake requests from rotated peers and cover traffic
- Clean up connection states and pending messages during peer ID rotation
- Filter out rotated peer IDs in keep-alive timer to prevent validation attempts
- Add session check before sending cover traffic dummy messages
- Disable cover traffic by default (was sending without user knowledge)
- Only send screenshot notifications when session exists
- Add logging to track automatic message triggers
- Fix compilation errors (SecureLogger.privacy -> security)
* Fix lazy handshake behavior and re-enable cover traffic
- Re-enable cover traffic for privacy protection
- Start handshake immediately when opening PM conversation
- Remove handshake request system notifications
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -610,8 +610,17 @@ class ChatViewModel: ObservableObject {
|
||||
if let peerID = selectedPrivateChatPeer {
|
||||
// In private chat - send to the other person
|
||||
if let peerNickname = meshService.getPeerNicknames()[peerID] {
|
||||
// Send the message directly without going through sendPrivateMessage to avoid local echo
|
||||
meshService.sendPrivateMessage(screenshotMessage, to: peerID, recipientNickname: peerNickname)
|
||||
// Only send screenshot notification if we have an established session
|
||||
// This prevents triggering handshake requests for screenshot notifications
|
||||
let sessionState = meshService.getNoiseSessionState(for: peerID)
|
||||
switch sessionState {
|
||||
case .established:
|
||||
// Send the message directly without going through sendPrivateMessage to avoid local echo
|
||||
meshService.sendPrivateMessage(screenshotMessage, to: peerID, recipientNickname: peerNickname)
|
||||
default:
|
||||
// Don't send screenshot notification if no session exists
|
||||
SecureLogger.log("Skipping screenshot notification to \(peerID) - no established session", category: SecureLogger.security, level: .debug)
|
||||
}
|
||||
}
|
||||
|
||||
// Show local notification immediately as system message
|
||||
|
||||
Reference in New Issue
Block a user