about summary refs log tree commit diff
path: root/LibMatrix/Responses/LoginResponse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'LibMatrix/Responses/LoginResponse.cs')
-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 {