mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 23:45:18 +00:00
During a panic reset, the new NoiseEncryptionService was assigned before the identity barrier ran, so a previously queued send block could observe the new crypto service alongside the old peer ID - signing with the new identity while carrying the old sender. The service teardown, replacement, callback configuration, and derived identity swap now run inside one messageQueue barrier (refreshPeerIdentity executes inline via its re-entrancy check), so queued sends see either the complete old identity or the complete new one, never a mix. Found by Codex review on #1336. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>