             return
         }
         
-        guard let lastAppVersion = UserDefaults.standard.wmf_lastAppVersion else {
-            log(event())
-            return
-        }
-        guard let latestSnapshot = latestSnapshot else {
-            return
-        }
-
-        let newSnapshot = event()
-        
-        guard !newSnapshot.wmf_isEqualTo(latestSnapshot, excluding: standardEvent.keys) || lastAppVersion != WikipediaAppUtils.appVersion() else {
-            // DDLogDebug("User History snapshots are identical; logging new User History snapshot aborted")
-            return
-        }
-        
-        // DDLogDebug("User History snapshots are different; logging new User History snapshot")
-        log(event())
+        dataStore.notificationsController.notificationPermissionsStatus { [weak self] authorizationStatus in
+            
+            guard let self = self else {
+                return
+            }
+            
+            DispatchQueue.main.async {
+                guard let lastAppVersion = UserDefaults.standard.wmf_lastAppVersion else {
+                    self.log(self.event(authorizationStatus: authorizationStatus))
+                    return
+                }
+                guard let latestSnapshot = self.latestSnapshot else {
+                    return
+                }
+                
+                let newSnapshot = self.event(authorizationStatus: authorizationStatus)
+                
+                guard !newSnapshot.wmf_isEqualTo(latestSnapshot, excluding: self.standardEvent.keys) || lastAppVersion != WikipediaAppUtils.appVersion() else {
+                    // DDLogDebug("User History snapshots are identical; logging new User History snapshot aborted")
+                    return
+                }
+                // DDLogDebug("User History snapshots are different; logging new User History snapshot")
+                self.log(self.event(authorizationStatus: authorizationStatus))
+            }
+        }
     }
     
     @objc public func logStartingSnapshot() {

        guard isTarget else {
            return
        }
        log(event())
        // DDLogDebug("Attempted to log starting User History snapshot")
    }
}


        super.init(schema: "MobileWikiAppiOSUserHistory", version: 22479505)
    }
    
    private func event(authorizationStatus: UNAuthorizationStatus?) -> Dictionary<String, Any> {
        let userDefaults = UserDefaults.standard
        
        let fontSize = UserDefaults.standard.wmf_articleFontSizeMultiplier().intValue
