mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
Put the session creator on the main actor instead.
This covers all login and registration options.
This commit is contained in:
@@ -23,6 +23,7 @@ protocol SessionCreatorProtocol {
|
||||
/// - client: The client that completed the authentication.
|
||||
/// - removeOtherAccounts: Flag to remove other accounts than the account specified with the `credentials.userId`.
|
||||
/// - Returns: A new `MXSession` for the account.
|
||||
@MainActor
|
||||
func createSession(credentials: MXCredentials, client: AuthenticationRestClient, removeOtherAccounts: Bool) -> MXSession
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ struct SessionCreator: SessionCreatorProtocol {
|
||||
self.accountManager = accountManager
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func createSession(credentials: MXCredentials, client: AuthenticationRestClient, removeOtherAccounts: Bool) -> MXSession {
|
||||
// Use identity server provided in the client
|
||||
if credentials.identityServer == nil {
|
||||
|
||||
Reference in New Issue
Block a user