mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 04:18:31 +00:00
Selecting a server that doesn't support login now fails instead of letting you continue to a failure later. (#3342)
* Fail configuration of the authentication service if the homeserver doesn't support login. * Move the ServerSelectionCoordinator logic into the ViewModel. - Handle the new login alert. - Add more tests
This commit is contained in:
@@ -65,6 +65,9 @@ class AuthenticationService: AuthenticationServiceProtocol {
|
||||
case .failure: nil
|
||||
}
|
||||
|
||||
if flow == .login, homeserver.loginMode == .unsupported {
|
||||
return .failure(.loginNotSupported)
|
||||
}
|
||||
if flow == .register, !homeserver.supportsRegistration {
|
||||
return .failure(.registrationNotSupported)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user