about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/RemoteHomeServer.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-26 02:43:54 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-27 17:43:00 +0200
commit3ed00f732a284b5a3e96e52d4e3a71869135869b (patch)
tree308cdd5c9891a676dc55cbf0e0e998ab5a74b2d2 /MatrixRoomUtils.Core/RemoteHomeServer.cs
parentWorking state, refactored Rory&::LibMatrix (diff)
downloadMatrixUtils-3ed00f732a284b5a3e96e52d4e3a71869135869b.tar.xz
Dependency injection stuff
Diffstat (limited to 'MatrixRoomUtils.Core/RemoteHomeServer.cs')
-rw-r--r--MatrixRoomUtils.Core/RemoteHomeServer.cs16
1 files changed, 0 insertions, 16 deletions
diff --git a/MatrixRoomUtils.Core/RemoteHomeServer.cs b/MatrixRoomUtils.Core/RemoteHomeServer.cs
index 3f50d2e..c593318 100644
--- a/MatrixRoomUtils.Core/RemoteHomeServer.cs
+++ b/MatrixRoomUtils.Core/RemoteHomeServer.cs
@@ -21,20 +21,4 @@ public class RemoteHomeServer : IHomeServer {
 
         return this;
     }
-
-    public async Task<Room> GetRoom(string roomId) => new Room(_httpClient, roomId);
-
-    public async Task<List<Room>> GetJoinedRooms() {
-        var rooms = new List<Room>();
-        var roomQuery = await _httpClient.GetAsync("/_matrix/client/v3/joined_rooms");
-        if (!roomQuery.IsSuccessStatusCode) {
-            Console.WriteLine($"Failed to get rooms: {await roomQuery.Content.ReadAsStringAsync()}");
-            throw new InvalidDataException($"Failed to get rooms: {await roomQuery.Content.ReadAsStringAsync()}");
-        }
-
-        var roomsJson = await roomQuery.Content.ReadFromJsonAsync<JsonElement>();
-        foreach (var room in roomsJson.GetProperty("joined_rooms").EnumerateArray()) rooms.Add(new Room(_httpClient, room.GetString()));
-
-        return rooms;
-    }
 }
\ No newline at end of file