Hardcode server versions for stop the SDK from making an extra requests on every startup

This commit is contained in:
Stefan Ceriu
2023-01-26 10:34:09 +02:00
committed by Stefan Ceriu
parent 0c45dd6d05
commit b6a89da254

View File

@@ -108,6 +108,7 @@ class UserSessionStore: UserSessionStoreProtocol {
.username(username: credentials.userID)
.homeserverUrl(url: credentials.restorationToken.session.homeserverUrl)
.userAgent(userAgent: UserAgentBuilder.makeASCIIUserAgent() ?? "unknown")
.serverVersions(versions: ["v1.0", "v1.1", "v1.2", "v1.3", "v1.4", "v1.5"]) // FIXME: Quick and dirty fix for stopping version requests on startup https://github.com/matrix-org/matrix-rust-sdk/pull/1376
do {
let client: Client = try await Task.dispatch(on: .global()) {