diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index 19a6d0e862..bfb8d35f2e 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -3458,13 +3458,18 @@ extension AppDelegate { SGLogger.shared.log("SGIAP", "Setting new primary user id: \(userId)") SGSimpleSettings.shared.primaryUserId = stringUserId } + } else { + SGLogger.shared.log("SGIAP", "Status expired") + DispatchQueue.main.async { + NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.Expired"]) + } } value.status = newStatus } else { SGLogger.shared.log("SGIAP", "Status \(value.status) for \(userId) hasn't changed") - if newStatus < 1 { + if newStatus < 2 { DispatchQueue.main.async { - NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.Expired"]) + NotificationCenter.default.post(name: .SGIAPHelperValidationErrorNotification, object: nil, userInfo: ["error": "PayWall.ValidationError.TryAgain"]) } } }