This commit is contained in:
Ryan Zhao 2022-03-02 09:42:13 +11:00
parent f632763eee
commit f7bfeb6e6d

View file

@ -30,7 +30,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
// Handle the push notification // Handle the push notification
AppReadiness.runNowOrWhenAppDidBecomeReady { AppReadiness.runNowOrWhenAppDidBecomeReady {
let openGorupPollingPromises = self.pollForOpneGorups() let openGorupPollingPromises = self.pollForOpenGroups()
defer { defer {
when(resolved: openGorupPollingPromises).done { _ in when(resolved: openGorupPollingPromises).done { _ in
self.completeSilenty() self.completeSilenty()
@ -173,7 +173,7 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
} }
// MARK: Poll for open groups // MARK: Poll for open groups
private func pollForOpneGorups() -> [Promise<Void>] { private func pollForOpenGroups() -> [Promise<Void>] {
var promises: [Promise<Void>] = [] var promises: [Promise<Void>] = []
let servers = Set(Storage.shared.getAllV2OpenGroups().values.map { $0.server }) let servers = Set(Storage.shared.getAllV2OpenGroups().values.map { $0.server })
servers.forEach { server in servers.forEach { server in