Add more logs

This commit is contained in:
Ali 2022-09-22 14:25:26 +02:00
parent c9868c4dd8
commit 2c0b29d14f

View File

@ -1395,6 +1395,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
} }
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Logger.shared.log("App \(self.episodeId)", "register for notifications: didRegisterForRemoteNotificationsWithDeviceToken (deviceToken: \(deviceToken))")
self.notificationTokenPromise.set(.single(deviceToken)) self.notificationTokenPromise.set(.single(deviceToken))
} }
@ -2146,6 +2147,7 @@ private func extractAccountManagerState(records: AccountRecordsView<TelegramAcco
UNUserNotificationCenter.current().setNotificationCategories([unknownMessageCategory, replyMessageCategory, replyLegacyMessageCategory, replyLegacyMediaMessageCategory, replyMediaMessageCategory, legacyChannelMessageCategory, muteMessageCategory, muteMediaMessageCategory]) UNUserNotificationCenter.current().setNotificationCategories([unknownMessageCategory, replyMessageCategory, replyLegacyMessageCategory, replyLegacyMediaMessageCategory, replyMediaMessageCategory, legacyChannelMessageCategory, muteMessageCategory, muteMediaMessageCategory])
Logger.shared.log("App \(self.episodeId)", "register for notifications: invoke registerForRemoteNotifications")
UIApplication.shared.registerForRemoteNotifications() UIApplication.shared.registerForRemoteNotifications()
} }
} }