diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index 7e279cfef..943ca4dc2 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -306,6 +306,14 @@ class CoreContext: ObservableObject { NotificationCenter.default.post(name: NSNotification.Name("CoreStarted"), object: nil) } ContactsManager.shared.fetchContacts() + + if let defaultAccountParams = self.mCore.defaultAccount?.params, defaultAccountParams.publishEnabled == false { + let params = defaultAccountParams + let clonedParams = params.clone() + clonedParams?.publishEnabled = true + self.mCore.defaultAccount?.params = clonedParams + } + if self.mCore.consolidatedPresence != ConsolidatedPresence.Online { self.updatePresence(core: self.mCore, presence: ConsolidatedPresence.Online) } diff --git a/msgNotificationService/NotificationService.swift b/msgNotificationService/NotificationService.swift index 557701382..62eec577f 100644 --- a/msgNotificationService/NotificationService.swift +++ b/msgNotificationService/NotificationService.swift @@ -99,6 +99,13 @@ class NotificationService: UNNotificationServiceExtension { createCore() // if !lc!.config!.getBool(section: "app", key: "disable_chat_feature", defaultValue: false) { Log.info("received push payload : \(bestAttemptContent.userInfo.debugDescription)") + + if let defaultAccountParams = lc?.defaultAccount?.params, defaultAccountParams.publishEnabled == true { + let params = defaultAccountParams + let clonedParams = params.clone() + clonedParams?.publishEnabled = false + lc?.defaultAccount?.params = clonedParams + } /* let defaults = UserDefaults.init(suiteName: Config.appGroupName)