about summary refs log tree commit diff
path: root/LibMatrix/Responses
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-26 13:09:05 +0000
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-10-26 13:09:05 +0000
commitb75135d8cdb702423d693558ffaec3f025264b98 (patch)
tree1e7c0d746ac387a0d6b648d4e452169db17debc6 /LibMatrix/Responses
parentMinor cleanup (diff)
downloadLibMatrix-b75135d8cdb702423d693558ffaec3f025264b98.tar.xz
split client and server http client for homeservers
Diffstat (limited to '')
-rw-r--r--LibMatrix/Responses/LoginResponse.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/LibMatrix/Responses/LoginResponse.cs b/LibMatrix/Responses/LoginResponse.cs
index 07b1601..a9ef3be 100644
--- a/LibMatrix/Responses/LoginResponse.cs
+++ b/LibMatrix/Responses/LoginResponse.cs
@@ -1,3 +1,4 @@
+using System.ComponentModel.DataAnnotations;
 using System.Text.Json.Serialization;
 using LibMatrix.Homeservers;
 using LibMatrix.Services;
@@ -23,7 +24,8 @@ public class LoginResponse {
     public string UserId { get; set; } = null!;
 
     public async Task<AuthenticatedHomeserverGeneric> GetAuthenticatedHomeserver(string? proxy = null) {
-        return await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverGeneric>(proxy ?? await new HomeserverResolverService().ResolveHomeserverFromWellKnown(Homeserver), AccessToken);
+        var urls = await new HomeserverResolverService().ResolveHomeserverFromWellKnown(Homeserver);
+        return await AuthenticatedHomeserverGeneric.Create<AuthenticatedHomeserverGeneric>(proxy ?? urls.client, AccessToken);
     }
 }
 public class LoginRequest {