5731275362
When the app restarts and reconnects to relays, old call offer events from completed calls could be replayed, causing the phone to ring for calls that already ended. This was especially noticeable when the user killed and restarted the app shortly after a call. Three protections added to CallManager: 1. Track completed call IDs: hangup/reject events mark their call-id as completed. Subsequent offer events for the same call-id are ignored. 2. Init timestamp guard: events created before the CallManager was initialized (minus a grace period) are rejected, preventing stale events from a previous app session from triggering ringing. 3. Completed call IDs survive reset(): the set is intentionally not cleared when the call state machine resets to Idle, ensuring that stale offers remain blocked for the lifetime of the CallManager. https://claude.ai/code/session_0145VKiG8yZMqcMsaBEjNPxv