about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor
diff options
context:
space:
mode:
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor10
1 files changed, 6 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor

index 4cb16b8..cd4788b 100644 --- a/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor +++ b/MatrixRoomUtils.Web/Pages/Rooms/PolicyList.razor
@@ -207,7 +207,9 @@ else { } private async Task LoadStatesAsync() { - var hs = await MRUStorage.GetCurrentSession(); + var hs = await MRUStorage.GetCurrentSessionOrNavigate(); + if (hs is null) return; + var room = await hs.GetRoom(RoomId); var states = room.GetFullStateAsync(); @@ -215,8 +217,8 @@ else { if (!state.Type.StartsWith("m.policy.rule")) continue; PolicyEvents.Add(state); } - - + + // var stateEventsQuery = await room.GetStateAsync(""); // var stateEvents = stateEventsQuery.Value.Deserialize<List<StateEventResponse>>(); // PolicyEvents = stateEvents.Where(x => x.Type.StartsWith("m.policy.rule")) @@ -247,4 +249,4 @@ else { StateHasChanged(); } -} \ No newline at end of file +}
OSZAR »