mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add an AccountProvider type and use it within the authentication flow. (#6103)
* Add an AccountProvider type and use it within AppSettings. * Use the AccountProvider type within the Authentication flow too. * Fix unit test compilation with Swift 6.4 * Make sure defaultAccountProvider takes allowOtherAccountProviders into account. * Document a caveat on using AuthenticationService.homeserver.value.accountProvider.
This commit is contained in:
@@ -37,7 +37,7 @@ struct DefaultRemoteSettingsHook: RemoteSettingsHookProtocol {
|
||||
let wellKnown = try JSONDecoder().decode(ElementWellKnown.self, from: wellKnownData)
|
||||
if wellKnown.enforceElementPro == true {
|
||||
let serverName = client.server() ?? client.homeserver()
|
||||
let displayableServerName = LoginHomeserver(address: serverName, loginMode: .unknown).address
|
||||
let displayableServerName = AccountProvider.generic(serverName).serverNameOrBaseURL
|
||||
return .failure(.elementProRequired(serverName: displayableServerName))
|
||||
} else {
|
||||
return .success(())
|
||||
|
||||
Reference in New Issue
Block a user