From 4ac527a9dc48ac1b59a3c0526aaaa50885cf0471 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 6 Nov 2024 20:08:59 +0200 Subject: [PATCH] Start syncing when receiving a background VoIP call for the cases in which the app was suspended but not terminated. --- ElementX/Sources/Application/AppCoordinator.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 71ee3f073..1a97ac871 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -149,6 +149,10 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg case .startCall(let roomID): self?.handleAppRoute(.call(roomID: roomID)) case .receivedIncomingCallRequest: + // When reporting a VoIP call through the CXProvider's `reportNewIncomingVoIPPushPayload` + // the UIApplication states don't change and syncing is neither started nor ran on + // a background task. Handle both manually here. + self?.startSync() self?.scheduleDelayedSyncStop() default: break