about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-25 03:07:05 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-06-25 03:07:05 +0200
commitf866946fbbe962c712049327ade9dcbd43900295 (patch)
tree3400fcce20f68a6ef3eb130f4ef57733e346d0e9 /MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs
parentWorking sync (diff)
downloadMatrixUtils-f866946fbbe962c712049327ade9dcbd43900295.tar.xz
Working state, refactored Rory&::LibMatrix
Diffstat (limited to 'MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs')
-rw-r--r--MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs b/MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs
index 7f634dc..6eaa73b 100644
--- a/MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs
+++ b/MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs
@@ -1,5 +1,6 @@
 using System.Text.Json;
 using MatrixRoomUtils.Core.Extensions;
+using MatrixRoomUtils.Core.Interfaces;
 using MatrixRoomUtils.Core.Responses;
 
 namespace MatrixRoomUtils.Core.RoomTypes;
@@ -11,10 +12,10 @@ public class SpaceRoom : Room {
         var rooms = new List<Room>();
         var state = await GetStateAsync("");
         if (state != null) {
-            var states = state.Value.Deserialize<StateEventResponse<object>[]>()!;
+            var states = state.Value.Deserialize<StateEventResponse[]>()!;
             foreach (var stateEvent in states.Where(x => x.Type == "m.space.child")) {
                 var roomId = stateEvent.StateKey;
-                if(stateEvent.Content.ToJson() != "{}" || includeRemoved)
+                if(stateEvent.TypedContent.ToJson() != "{}" || includeRemoved)
                     rooms.Add(await RuntimeCache.CurrentHomeServer.GetRoom(roomId));
             }
         }