diff options
Diffstat (limited to 'MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs')
-rw-r--r-- | MatrixRoomUtils.Core/RoomTypes/SpaceRoom.cs | 5 |
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)); } } |