From b6a89da254cec43e1e43cb84865892f20556ddfd Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Thu, 26 Jan 2023 10:34:09 +0200 Subject: [PATCH] Hardcode server versions for stop the SDK from making an extra requests on every startup --- ElementX/Sources/Services/UserSession/UserSessionStore.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ElementX/Sources/Services/UserSession/UserSessionStore.swift b/ElementX/Sources/Services/UserSession/UserSessionStore.swift index 31e688e30..a312dc435 100644 --- a/ElementX/Sources/Services/UserSession/UserSessionStore.swift +++ b/ElementX/Sources/Services/UserSession/UserSessionStore.swift @@ -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()) {