mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use server name from user id function (#6082)
update sdk and use the new server from user id function from the sdk
This commit is contained in:
+4
-1
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Combine
|
||||
import MatrixRustSDK
|
||||
import SwiftUI
|
||||
|
||||
typealias ServerSelectionScreenViewModelType = StateStoreViewModelV2<ServerSelectionScreenViewState, ServerSelectionScreenViewAction>
|
||||
@@ -101,7 +102,9 @@ class ServerSelectionScreenViewModel: ServerSelectionScreenViewModelType, Server
|
||||
|
||||
/// Updates the login flow using the supplied homeserver address, or shows an error when this isn't possible.
|
||||
private func configureHomeserver() async {
|
||||
let homeserverAddress = state.bindings.homeserverAddress
|
||||
let userInput = state.bindings.homeserverAddress
|
||||
// People often enter their Matrix ID here, so use the server name from it when they do.
|
||||
let homeserverAddress = (try? serverNameFromUserId(userId: userInput)) ?? userInput
|
||||
startLoading()
|
||||
|
||||
switch await authenticationService.configure(for: homeserverAddress, flow: authenticationFlow) {
|
||||
|
||||
Reference in New Issue
Block a user