mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 11:45:19 +00:00
Fix Noise handshake failures and implement binary protocol migration
- Fix asymmetric handshake state causing message delivery failures - Prevent duplicate handshake init messages from disrupting ongoing handshakes - Add defensive copying to all binary decoders to prevent thread safety issues - Implement binary encoding for all 9 message types (60-80% bandwidth reduction) - Fix delivery ACK decoding for Noise encrypted messages - Add comprehensive logging for debugging handshake and message flow - Fix race condition in delivery status updates - Add relay logic for handshake packets to ensure mesh delivery - Maintain backward compatibility with JSON fallback
This commit is contained in:
@@ -3654,6 +3654,7 @@ extension ChatViewModel: BitchatDelegate {
|
||||
}
|
||||
|
||||
private func updateMessageDeliveryStatus(_ messageID: String, status: DeliveryStatus) {
|
||||
print("🔄 Updating UI delivery status for message \(messageID): \(status)")
|
||||
|
||||
// Helper function to check if we should skip this update
|
||||
func shouldSkipUpdate(currentStatus: DeliveryStatus?, newStatus: DeliveryStatus) -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user