diff options
author | Rory& <root@rory.gay> | 2024-01-08 13:55:15 +0100 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-01-08 13:56:32 +0100 |
commit | ede3857084bc7c6e65b7d36cbf913b09596e2787 (patch) | |
tree | b94694c307fb831ea5e63fabde0dbb5f56f02941 /MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs | |
parent | Small changes (diff) | |
download | MatrixUtils-ede3857084bc7c6e65b7d36cbf913b09596e2787.tar.xz |
Internal changes to policy list viewer (extensibility), fix duplicating change handler for room list page (performance), use /state in room list page before sync
Diffstat (limited to 'MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs')
-rw-r--r-- | MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs b/MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs index cbe2303..1cf7064 100644 --- a/MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs +++ b/MatrixRoomUtils.LibDMSpace/DMSpaceRoom.cs @@ -24,7 +24,7 @@ public class DMSpaceRoom(AuthenticatedHomeserverGeneric homeserver, string roomI } public async Task<EventIdResponse> AddChildAsync(GenericRoom room) { - var members = room.GetMembersAsync(true); + var members = room.GetMembersEnumerableAsync(true); Dictionary<string, int> memberCountByHs = new(); await foreach (var member in members) { var server = member.StateKey.Split(':')[1]; @@ -61,12 +61,12 @@ public class DMSpaceRoom(AuthenticatedHomeserverGeneric homeserver, string roomI } }; // Add all DM room members - var members = homeserver.GetRoom(roomid).GetMembersAsync(); + var members = homeserver.GetRoom(roomid).GetMembersEnumerableAsync(); await foreach (var member in members) if (member.StateKey != userId) dri.RemoteUsers.Add(member.StateKey); // Remove members of DM space - members = GetMembersAsync(); + members = GetMembersEnumerableAsync(); await foreach (var member in members) if (dri.RemoteUsers.Contains(member.StateKey)) dri.RemoteUsers.Remove(member.StateKey); |