diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-04 02:17:10 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-04 02:17:10 +0200 |
commit | 21da6cde79ccd0cb7f895a29e3d8cab959ef11ba (patch) | |
tree | fb0b89566b64ae907d7ca3ea8a29adcf0c0361d0 /LibMatrix/RoomTypes/SpaceRoom.cs | |
parent | Clean up some extension functions (diff) | |
download | LibMatrix-21da6cde79ccd0cb7f895a29e3d8cab959ef11ba.tar.xz |
Too many changes to name...
Diffstat (limited to 'LibMatrix/RoomTypes/SpaceRoom.cs')
-rw-r--r-- | LibMatrix/RoomTypes/SpaceRoom.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/LibMatrix/RoomTypes/SpaceRoom.cs b/LibMatrix/RoomTypes/SpaceRoom.cs index 5393ee7..017a123 100644 --- a/LibMatrix/RoomTypes/SpaceRoom.cs +++ b/LibMatrix/RoomTypes/SpaceRoom.cs @@ -1,13 +1,17 @@ +using System.Collections.Generic; +using System.Threading; +using ArcaneLibs.Extensions; using LibMatrix.Extensions; +using LibMatrix.Homeservers; namespace LibMatrix.RoomTypes; public class SpaceRoom : GenericRoom { - private new readonly AuthenticatedHomeServer _homeServer; + private new readonly AuthenticatedHomeserverGeneric _homeserver; private readonly GenericRoom _room; - public SpaceRoom(AuthenticatedHomeServer homeServer, string roomId) : base(homeServer, roomId) { - _homeServer = homeServer; + public SpaceRoom(AuthenticatedHomeserverGeneric homeserver, string roomId) : base(homeserver, roomId) { + _homeserver = homeserver; } private static SemaphoreSlim _semaphore = new(1, 1); @@ -18,7 +22,7 @@ public class SpaceRoom : GenericRoom { await foreach (var stateEvent in state) { if (stateEvent.Type != "m.space.child") continue; if (stateEvent.RawContent.ToJson() != "{}" || includeRemoved) - yield return await _homeServer.GetRoom(stateEvent.StateKey); + yield return await _homeserver.GetRoom(stateEvent.StateKey); } _semaphore.Release(); } |