Put the session creator on the main actor instead.

This covers all login and registration options.
This commit is contained in:
Doug
2022-09-16 12:31:25 +01:00
parent cc737fe1cc
commit aa31c852f1
5 changed files with 13 additions and 10 deletions
@@ -255,7 +255,7 @@ class RegistrationWizard {
do {
let response = try await client.register(parameters: parameters)
let credentials = MXCredentials(loginResponse: response, andDefaultCredentials: client.credentials)
return .success(sessionCreator.createSession(credentials: credentials, client: client, removeOtherAccounts: false))
return await .success(sessionCreator.createSession(credentials: credentials, client: client, removeOtherAccounts: false))
} catch {
let nsError = error as NSError