diff --git a/Telegram/NotificationService/Sources/NotificationService.swift b/Telegram/NotificationService/Sources/NotificationService.swift index a63054d8e5..a7e6d5c589 100644 --- a/Telegram/NotificationService/Sources/NotificationService.swift +++ b/Telegram/NotificationService/Sources/NotificationService.swift @@ -673,7 +673,7 @@ private final class NotificationServiceHandler { incomingCallMessage = "is calling you" } - Logger.shared.log("NotificationService \(episode)", "Begin processing payload \(payload)") + Logger.shared.log("NotificationService \(episode)", "Begin processing payload") guard var encryptedPayload = payload["p"] as? String else { Logger.shared.log("NotificationService \(episode)", "Invalid payload 1") @@ -691,13 +691,16 @@ private final class NotificationServiceHandler { let _ = (combineLatest(queue: self.queue, self.accountManager.accountRecords(), - self.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.inAppNotificationSettings, ApplicationSpecificSharedDataKeys.voiceCallSettings]) + self.accountManager.sharedData(keys: [ApplicationSpecificSharedDataKeys.inAppNotificationSettings, ApplicationSpecificSharedDataKeys.voiceCallSettings, SharedDataKeys.loggingSettings]) ) |> take(1) |> deliverOn(self.queue)).start(next: { [weak self] records, sharedData in var recordId: AccountRecordId? var isCurrentAccount: Bool = false - var customSoundPath: String? + + let loggingSettings = sharedData.entries[SharedDataKeys.loggingSettings]?.get(LoggingSettings.self) ?? LoggingSettings.defaultSettings + Logger.shared.logToFile = loggingSettings.logging.logToFile + Logger.shared.logToConsole = loggingSettings.logging.logToConsole if let keyId = notificationPayloadKeyId(data: payloadData) { outer: for listRecord in records.records { diff --git a/submodules/TelegramCore/Sources/Account/Account.swift b/submodules/TelegramCore/Sources/Account/Account.swift index a59d03908b..c53f093c55 100644 --- a/submodules/TelegramCore/Sources/Account/Account.swift +++ b/submodules/TelegramCore/Sources/Account/Account.swift @@ -1369,6 +1369,8 @@ public func standaloneStateManager( Logger.shared.log("StandaloneStateManager", "Received settings") return postbox.transaction { transaction -> (PostboxCoding?, LocalizationSettings?, ProxySettings?, NetworkSettings?) in + Logger.shared.log("StandaloneStateManager", "Getting state") + let state = transaction.getState() return (state, localizationSettings, proxySettings, transaction.getPreferencesEntry(key: PreferencesKeys.networkSettings)?.get(NetworkSettings.self))