diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-26 13:09:05 +0000 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-10-26 13:09:05 +0000 |
commit | b75135d8cdb702423d693558ffaec3f025264b98 (patch) | |
tree | 1e7c0d746ac387a0d6b648d4e452169db17debc6 /LibMatrix/Responses/LoginResponse.cs | |
parent | Minor cleanup (diff) | |
download | LibMatrix-b75135d8cdb702423d693558ffaec3f025264b98.tar.xz |
split client and server http client for homeservers
Diffstat (limited to 'LibMatrix/Responses/LoginResponse.cs')
-rw-r--r-- | LibMatrix/Responses/LoginResponse.cs | 4 |
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 { |