From 398442ff125193f2261f21f1e9997f5216ae2af1 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 8 Aug 2024 14:02:14 +0300 Subject: [PATCH] Fixes #3135 - Ignore multiple call notify pushes for the same room --- .../Sources/Services/ElementCall/ElementCallService.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ElementX/Sources/Services/ElementCall/ElementCallService.swift b/ElementX/Sources/Services/ElementCall/ElementCallService.swift index 43b84c596..e84ff2000 100644 --- a/ElementX/Sources/Services/ElementCall/ElementCallService.swift +++ b/ElementX/Sources/Services/ElementCall/ElementCallService.swift @@ -140,6 +140,11 @@ class ElementCallService: NSObject, ElementCallServiceProtocol, PKPushRegistryDe return } + guard ongoingCallID?.roomID != roomID else { + MXLog.warning("Call already ongoing for room \(roomID), ignoring incoming push") + return + } + let callID = CallID(callKitID: UUID(), roomID: roomID) incomingCallID = callID