diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift index 0fab2106f..8551ba7a3 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSSubscriptionModel.swift @@ -293,13 +293,13 @@ extension OSSubscriptionModel { // Calculates if the device is opted in to push notification. // Must have permission and not be opted out. func calculateIsOptedIn(accepted: Bool, isDisabled: Bool) -> Bool { - return _accepted && !_isDisabled + return accepted && !isDisabled } // Calculates if push notifications are enabled on the device. // Does not consider the existence of the subscription_id, as we send this in the request to create a push subscription. func calculateIsEnabled(address: String?, accepted: Bool, isDisabled: Bool) -> Bool { - return (self.address != nil) && _accepted && !_isDisabled + return address != nil && accepted && !isDisabled } func updateNotificationTypes() { diff --git a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift index 66514481f..32e3dc164 100644 --- a/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift +++ b/iOS_SDK/OneSignalSDK/OneSignalUser/Source/OSUserRequests.swift @@ -216,8 +216,9 @@ class OSUserExecutor { static func executeIdentifyUserRequest(_ request: OSRequestIdentifyUser) { OneSignalClient.shared().execute(request) { _ in - // the anonymous user has been identified, no further action needed, no need to fetch user - executePendingRequests() + // the anonymous user has been identified, still need to Fetch User as we cleared local data + fetchUser(aliasLabel: OS_EXTERNAL_ID, aliasId: request.aliasId, identityModel: request.identityModelToUpdate) + executePendingRequests() // TODO: Here or before fetch? } onFailure: { error in // Returns 409 if any provided (label, id) pair exists on another User, so the SDK will switch to this user. if error?._code == 409 {