about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 18:40:53 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 18:40:53 +0200
commit3d3edeae16252a311704b390cfad6faa435a8b84 (patch)
tree34974194435fbe9789de5140ef9a9c0ddb834c74 /MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor
parentAdd policy room discovery ,add room state viewer (diff)
downloadMatrixUtils-3d3edeae16252a311704b390cfad6faa435a8b84.tar.xz
Refactor
Diffstat (limited to 'MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor')
-rw-r--r--MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor8
1 files changed, 4 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor b/MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor
index ffd17d4..8c33d89 100644
--- a/MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor
+++ b/MatrixRoomUtils.Web/Pages/RoomStateViewerPage.razor
@@ -80,9 +80,9 @@
 
     protected override async Task OnInitializedAsync()
     {
-        if (!RuntimeStorage.WasLoaded) await RuntimeStorage.LoadFromLocalStorage(LocalStorage);
+        if (!LocalStorageWrapper.WasLoaded) await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
         await base.OnInitializedAsync();
-        if (RuntimeStorage.AccessToken == null || RuntimeStorage.CurrentHomeserver == null)
+        if (LocalStorageWrapper.AccessToken == null || LocalStorageWrapper.CurrentHomeserver == null)
         {
             NavigationManager.NavigateTo("/Login");
             return;
@@ -97,8 +97,8 @@
     {
         int StateLoaded = 0;
         using var client = new HttpClient();
-        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", RuntimeStorage.AccessToken);
-    var response = await client.GetAsync($"{RuntimeStorage.CurrentHomeserver}/_matrix/client/r0/rooms/{RoomId}/state");
+        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", LocalStorageWrapper.AccessToken);
+    var response = await client.GetAsync($"{LocalStorageWrapper.CurrentHomeserver}/_matrix/client/r0/rooms/{RoomId}/state");
         // var response = await client.GetAsync($"http://localhost:5117/matrix-hq-state.json");
     //var _events = await response.Content.ReadFromJsonAsync<Queue<StateEventStruct>>();
         var _data = await response.Content.ReadAsStreamAsync();