Merge branch 'develop' into ismail/6177_wellknown_IS

This commit is contained in:
ismailgulek
2022-06-06 15:23:22 +03:00
51 changed files with 2391 additions and 74 deletions

View File

@@ -16,9 +16,17 @@
import Foundation
/// A WIP class that has common functionality to create a new session.
class SessionCreator {
protocol SessionCreatorProtocol {
/// Creates an `MXSession` using the supplied credentials and REST client.
/// - Parameters:
/// - credentials: The `MXCredentials` for the account.
/// - client: The client that completed the authentication.
/// - Returns: A new `MXSession` for the account.
func createSession(credentials: MXCredentials, client: AuthenticationRestClient) -> MXSession
}
/// A struct that provides common functionality to create a new session.
struct SessionCreator: SessionCreatorProtocol {
func createSession(credentials: MXCredentials, client: AuthenticationRestClient) -> MXSession {
// Report the new account in account manager
if credentials.identityServer == nil {