about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Responses/LoginResponse.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-28 10:38:45 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-28 10:38:45 +0200
commita331eb2f118e0051c6c6744a20d6b0934c4d6d6f (patch)
treea7798d94a3553106aad40507e2dc04ff9d2f9efd /MatrixRoomUtils.Core/Responses/LoginResponse.cs
parentDependency injection stuff (diff)
downloadMatrixUtils-a331eb2f118e0051c6c6744a20d6b0934c4d6d6f.tar.xz
Update stuff
Diffstat (limited to 'MatrixRoomUtils.Core/Responses/LoginResponse.cs')
-rw-r--r--MatrixRoomUtils.Core/Responses/LoginResponse.cs13
1 files changed, 0 insertions, 13 deletions
diff --git a/MatrixRoomUtils.Core/Responses/LoginResponse.cs b/MatrixRoomUtils.Core/Responses/LoginResponse.cs
index 8d0d94f..b248739 100644
--- a/MatrixRoomUtils.Core/Responses/LoginResponse.cs
+++ b/MatrixRoomUtils.Core/Responses/LoginResponse.cs
@@ -1,7 +1,4 @@
-using System.Net.Http.Json;
-using System.Text.Json;
 using System.Text.Json.Serialization;
-using MatrixRoomUtils.Core.StateEventTypes;
 
 namespace MatrixRoomUtils.Core.Responses;
 
@@ -17,14 +14,4 @@ public class LoginResponse {
 
     [JsonPropertyName("user_id")]
     public string UserId { get; set; }
-
-    public async Task<ProfileResponse> GetProfile() {
-        var hc = new HttpClient();
-        var resp = await hc.GetAsync($"{HomeServer}/_matrix/client/v3/profile/{UserId}");
-        var data = await resp.Content.ReadFromJsonAsync<JsonElement>();
-        if (!resp.IsSuccessStatusCode) Console.WriteLine("Profile: " + data);
-        return data.Deserialize<ProfileResponse>();
-    }
-
-    public async Task<string> GetCanonicalHomeserverUrl() => (await new RemoteHomeServer(HomeServer).Configure()).FullHomeServerDomain;
 }
\ No newline at end of file