From 25ffe98912dd814097b560ba99510e0980d25dc2 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO <> Date: Wed, 4 Dec 2024 16:50:13 +1100 Subject: [PATCH] fix an issue when app is in background state, call messages are not handled properly --- Session.xcodeproj/project.pbxproj | 4 ++-- SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 6bb171e14..45a8cde16 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -7778,7 +7778,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 504; + CURRENT_PROJECT_VERSION = 505; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -7849,7 +7849,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 504; + CURRENT_PROJECT_VERSION = 505; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift b/SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift index 1f11a1457..dd6ef8a7b 100644 --- a/SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift +++ b/SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift @@ -413,7 +413,9 @@ public class Poller { job: job, canStartJob: ( !forceSynchronousProcessing && - (Singleton.hasAppContext && !Singleton.appContext.isInBackground) + (Singleton.hasAppContext && !Singleton.appContext.isInBackground) || + // FIXME: Better seperate the call messages handling, since we need to handle them all the time + SessionEnvironment.shared?.callManager.wrappedValue?.currentCall != nil ), using: dependencies )