about summary refs log tree commit diff
path: root/LibMatrix/Services/HomeserverProviderService.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-16 11:46:45 +0200
committerRory& <root@rory.gay>2024-05-16 11:46:45 +0200
commite1f99073f3d9788a4b48d2bb7091e3894dcefa1a (patch)
tree63eaa6ead968ca0fd3f2a85a2b6ae13bab900156 /LibMatrix/Services/HomeserverProviderService.cs
parentAdd valid room memberhip values as constants (diff)
downloadLibMatrix-e1f99073f3d9788a4b48d2bb7091e3894dcefa1a.tar.xz
Dont use refs for proxy
Diffstat (limited to '')
-rw-r--r--LibMatrix/Services/HomeserverProviderService.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/LibMatrix/Services/HomeserverProviderService.cs b/LibMatrix/Services/HomeserverProviderService.cs
index 9867184..3e42c21 100644
--- a/LibMatrix/Services/HomeserverProviderService.cs
+++ b/LibMatrix/Services/HomeserverProviderService.cs
@@ -19,7 +19,7 @@ public class HomeserverProviderService(ILogger<HomeserverProviderService> logger
 
         return await AuthenticatedHomeserverCache.GetOrAdd($"{homeserver}{accessToken}{proxy}{impersonatedMxid}", async () => {
             var wellKnownUris = await hsResolver.ResolveHomeserverFromWellKnown(homeserver, enableClient, enableServer);
-            var rhs = new RemoteHomeserver(homeserver, wellKnownUris, ref proxy);
+            var rhs = new RemoteHomeserver(homeserver, wellKnownUris, proxy);
 
             AuthenticatedHomeserverGeneric? hs = null;
             if (!useGeneric) {
@@ -42,10 +42,10 @@ public class HomeserverProviderService(ILogger<HomeserverProviderService> logger
 
                 try {
                     if (clientVersions.UnstableFeatures.TryGetValue("gay.rory.mxapiextensions.v0", out var a) && a)
-                        hs = new AuthenticatedHomeserverMxApiExtended(homeserver, wellKnownUris, ref proxy, accessToken);
+                        hs = new AuthenticatedHomeserverMxApiExtended(homeserver, wellKnownUris, proxy, accessToken);
                     else {
                         if (serverVersion is { Server.Name: "Synapse" })
-                            hs = new AuthenticatedHomeserverSynapse(homeserver, wellKnownUris, ref proxy, accessToken);
+                            hs = new AuthenticatedHomeserverSynapse(homeserver, wellKnownUris, proxy, accessToken);
                     }
                 }
                 catch (Exception e) {
@@ -54,7 +54,7 @@ public class HomeserverProviderService(ILogger<HomeserverProviderService> logger
                 }
             }
 
-            hs ??= new AuthenticatedHomeserverGeneric(homeserver, wellKnownUris, ref proxy, accessToken);
+            hs ??= new AuthenticatedHomeserverGeneric(homeserver, wellKnownUris, proxy, accessToken);
 
             await hs.Initialise();
 
@@ -68,8 +68,8 @@ public class HomeserverProviderService(ILogger<HomeserverProviderService> logger
     public async Task<RemoteHomeserver> GetRemoteHomeserver(string homeserver, string? proxy = null, bool useCache = true, bool enableServer = true) =>
         useCache
             ? await RemoteHomeserverCache.GetOrAdd($"{homeserver}{proxy}",
-                async () => { return new RemoteHomeserver(homeserver, await hsResolver.ResolveHomeserverFromWellKnown(homeserver, enableServer: enableServer), ref proxy); })
-            : new RemoteHomeserver(homeserver, await hsResolver.ResolveHomeserverFromWellKnown(homeserver, enableServer: enableServer), ref proxy);
+                async () => { return new RemoteHomeserver(homeserver, await hsResolver.ResolveHomeserverFromWellKnown(homeserver, enableServer: enableServer), proxy); })
+            : new RemoteHomeserver(homeserver, await hsResolver.ResolveHomeserverFromWellKnown(homeserver, enableServer: enableServer), proxy);
 
     public async Task<FederationClient> GetFederationClient(string homeserver, string keyId, string? proxy = null, bool useCache = true) =>
         useCache