diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-15 02:11:36 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2024-01-15 02:11:36 +0100 |
commit | cb92b267f46113f3c0a6138729ac584be6ae9399 (patch) | |
tree | 30031f273907a06be9a4709e757efac090c5930a /LibMatrix/Services/HomeserverProviderService.cs | |
parent | Synchelper: better initial sync detection (diff) | |
download | LibMatrix-cb92b267f46113f3c0a6138729ac584be6ae9399.tar.xz |
Abstract FederationClient from RemoteHomeserver
Diffstat (limited to 'LibMatrix/Services/HomeserverProviderService.cs')
-rw-r--r-- | LibMatrix/Services/HomeserverProviderService.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LibMatrix/Services/HomeserverProviderService.cs b/LibMatrix/Services/HomeserverProviderService.cs index 577a706..4cf74d1 100644 --- a/LibMatrix/Services/HomeserverProviderService.cs +++ b/LibMatrix/Services/HomeserverProviderService.cs @@ -42,7 +42,7 @@ public class HomeserverProviderService(ILogger<HomeserverProviderService> logger if (clientVersions.UnstableFeatures.TryGetValue("gay.rory.mxapiextensions.v0", out bool a) && a) hs = await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverMxApiExtended>(homeserver, accessToken, proxy); else { - var serverVersion = await rhs.GetServerVersionAsync(); + var serverVersion = await (rhs.FederationClient?.GetServerVersionAsync() ?? Task.FromResult<ServerVersionResponse?>(null)); if (serverVersion is { Server.Name: "Synapse" }) hs = await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverSynapse>(homeserver, accessToken, proxy); else |