mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-05 02:18:56 +00:00
* [MM-70525] Fix CallKit call disconnect on lock-screen answer NativeCallMapping gains an optional callId field. When a VoIP push arrives the mapping is created with callId seeded from calls state (empty string if call_started hasn't been processed yet). handleCallStarted backfills the callId once the WebSocket event confirms the call is live. getNativeCallUUIDForCall now accepts an optional callId: when provided, a mapping whose callId is empty or mismatched is treated as unconfirmed and returns undefined, making endNativeCall a no-op. This prevents a buffered call_end event from a prior call being replayed on WebSocket reconnect from tearing down the active CallKit session. handleCallEnded reads the callId from calls state before callEnded() removes it, then passes it through to endNativeCall so the guard can distinguish the current call from a stale replayed event. * [MM-70525] Add handler-level tests for callId backfill and stale replay guard Tests handleCallStarted backfilling callId into an existing native mapping (VoIP-push-first ordering), handleCallEnded reading callId from state before callEnded() clears it, and the stale call_end replay path where no active call is in state. * [MM-70525] Tighten callId ordering test: callEnded mock clears state Makes the callEnded mock simulate state cleanup so the test fails if callId is read after callEnded() rather than before it. |
||
|---|---|---|
| .. | ||
| app.ts | ||
| calls_native.test.ts | ||
| calls_native.ts | ||
| credentials.test.ts | ||
| credentials.ts | ||
| launch.test.ts | ||
| launch.ts | ||
| managed_app.test.ts | ||
| managed_app.ts | ||
| push_notifications.test.ts | ||
| push_notifications.ts | ||