diff --git a/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift b/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift index d36c41303cba..8e4fcf289706 100644 --- a/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift +++ b/ios/MullvadVPN/Notifications/Notification Providers/TunnelStatusNotificationProvider.swift @@ -231,6 +231,8 @@ final class TunnelStatusNotificationProvider: NotificationProvider, InAppNotific errorString = "No servers match your settings, try changing server or other settings." case .invalidAccount: errorString = "You are logged in with an invalid account number. Please log out and try another one." + case .accountExpired: + errorString = "Account is out of time." case .deviceRevoked, .deviceLoggedOut: errorString = "Unable to authenticate account. Please log out and log back in." default: diff --git a/ios/PacketTunnel/PacketTunnelProvider/DeviceCheck+BlockedStateReason.swift b/ios/PacketTunnel/PacketTunnelProvider/DeviceCheck+BlockedStateReason.swift index f6c2d28c1d20..8ff50cba8304 100644 --- a/ios/PacketTunnel/PacketTunnelProvider/DeviceCheck+BlockedStateReason.swift +++ b/ios/PacketTunnel/PacketTunnelProvider/DeviceCheck+BlockedStateReason.swift @@ -20,6 +20,10 @@ extension DeviceCheck { return .deviceRevoked } + if case .expired = accountVerdict { + return .accountExpired + } + return nil } } diff --git a/ios/PacketTunnelCore/Actor/State+Extensions.swift b/ios/PacketTunnelCore/Actor/State+Extensions.swift index 71a090acb268..f761b159e80f 100644 --- a/ios/PacketTunnelCore/Actor/State+Extensions.swift +++ b/ios/PacketTunnelCore/Actor/State+Extensions.swift @@ -104,8 +104,8 @@ extension BlockedStateReason { case .deviceLocked: return true - case .noRelaysSatisfyingConstraints, .readSettings, .invalidAccount, .deviceRevoked, .tunnelAdapter, .unknown, - .deviceLoggedOut, .outdatedSchema: + case .noRelaysSatisfyingConstraints, .readSettings, .invalidAccount, .accountExpired, .deviceRevoked, + .tunnelAdapter, .unknown, .deviceLoggedOut, .outdatedSchema: return false } } diff --git a/ios/PacketTunnelCore/Actor/State.swift b/ios/PacketTunnelCore/Actor/State.swift index 36a427e4964c..b79b59e4167b 100644 --- a/ios/PacketTunnelCore/Actor/State.swift +++ b/ios/PacketTunnelCore/Actor/State.swift @@ -177,6 +177,9 @@ public enum BlockedStateReason: String, Codable, Equatable { /// Invalid account. case invalidAccount + /// Account is expired. + case accountExpired + /// Device revoked. case deviceRevoked