diff --git a/LibMatrix b/LibMatrix
-Subproject 9f8d0c85c54b4715974994aea52562072d6f175
+Subproject 3dfb7b81b0fe19d37a7bf1183e248ca10c56277
diff --git a/MatrixRoomUtils.sln b/MatrixRoomUtils.sln
index f530533..9cccf09 100644
--- a/MatrixRoomUtils.sln
+++ b/MatrixRoomUtils.sln
@@ -54,6 +54,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibMatrix.JsonSerializerCon
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibMatrix.DevTestBot", "LibMatrix\Utilities\LibMatrix.DevTestBot\LibMatrix.DevTestBot.csproj", "{5CE239F8-C124-4A96-A0F8-B56B9AE27434}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibMatrix.HomeserverEmulator", "LibMatrix\Tests\LibMatrix.HomeserverEmulator\LibMatrix.HomeserverEmulator.csproj", "{6D93DA72-69D8-43BD-BC19-7FFF8A313971}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -144,6 +146,10 @@ Global
{5CE239F8-C124-4A96-A0F8-B56B9AE27434}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CE239F8-C124-4A96-A0F8-B56B9AE27434}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CE239F8-C124-4A96-A0F8-B56B9AE27434}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6D93DA72-69D8-43BD-BC19-7FFF8A313971}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6D93DA72-69D8-43BD-BC19-7FFF8A313971}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6D93DA72-69D8-43BD-BC19-7FFF8A313971}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6D93DA72-69D8-43BD-BC19-7FFF8A313971}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F4E241C3-0300-4B87-8707-BCBDEF1F0185} = {8F4F6BEC-0C66-486B-A21A-1C35B2EDAD33}
@@ -165,5 +171,6 @@ Global
{1CAA2B6D-0365-4C8B-96EE-26026514FEE2} = {8F4F6BEC-0C66-486B-A21A-1C35B2EDAD33}
{CC836863-0EE8-44BD-BF39-45076F57C416} = {A4BCBF5F-4936-44B9-BAB3-FAF240BDF40D}
{5CE239F8-C124-4A96-A0F8-B56B9AE27434} = {A4BCBF5F-4936-44B9-BAB3-FAF240BDF40D}
+ {6D93DA72-69D8-43BD-BC19-7FFF8A313971} = {7D2C9959-8309-4110-A67F-DEE64E97C1D8}
EndGlobalSection
EndGlobal
diff --git a/MatrixUtils.Web/Pages/Dev/DevOptions.razor b/MatrixUtils.Web/Pages/Dev/DevOptions.razor
index 6ca0b53..fa0cdff 100644
--- a/MatrixUtils.Web/Pages/Dev/DevOptions.razor
+++ b/MatrixUtils.Web/Pages/Dev/DevOptions.razor
@@ -1,6 +1,5 @@
@page "/Dev/Options"
@using ArcaneLibs.Extensions
-@using System.Text.Unicode
@using System.Text
@using System.Text.Json
@inject NavigationManager NavigationManager
diff --git a/MatrixUtils.Web/Pages/Dev/DevUtilities.razor b/MatrixUtils.Web/Pages/Dev/DevUtilities.razor
index a6a4a82..611d4c1 100644
--- a/MatrixUtils.Web/Pages/Dev/DevUtilities.razor
+++ b/MatrixUtils.Web/Pages/Dev/DevUtilities.razor
@@ -1,8 +1,5 @@
@page "/Dev/Utilities"
-@using System.Reflection
@using ArcaneLibs.Extensions
-@using LibMatrix.Extensions
-@using LibMatrix.Homeservers
@using MatrixUtils.Abstractions
@inject ILocalStorageService LocalStorage
@inject NavigationManager NavigationManager
diff --git a/MatrixUtils.Web/Pages/HSAdmin/HSAdmin.razor b/MatrixUtils.Web/Pages/HSAdmin/HSAdmin.razor
index 6499f57..9c61431 100644
--- a/MatrixUtils.Web/Pages/HSAdmin/HSAdmin.razor
+++ b/MatrixUtils.Web/Pages/HSAdmin/HSAdmin.razor
@@ -1,5 +1,4 @@
@page "/HSAdmin"
-@using LibMatrix.Homeservers
@using ArcaneLibs.Extensions
<h3>Homeserver Admininistration</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/HSAdmin/RoomQuery.razor b/MatrixUtils.Web/Pages/HSAdmin/RoomQuery.razor
index 10628ad..afd58af 100644
--- a/MatrixUtils.Web/Pages/HSAdmin/RoomQuery.razor
+++ b/MatrixUtils.Web/Pages/HSAdmin/RoomQuery.razor
@@ -1,7 +1,6 @@
@page "/HSAdmin/RoomQuery"
@using LibMatrix.Responses.Admin
@using LibMatrix.Filters
-@using LibMatrix.Homeservers
@using ArcaneLibs.Extensions
<h3>Homeserver Administration - Room Query</h3>
diff --git a/MatrixUtils.Web/Pages/HSEInit.razor b/MatrixUtils.Web/Pages/HSEInit.razor
new file mode 100644
index 0000000..3020ff7
--- /dev/null
+++ b/MatrixUtils.Web/Pages/HSEInit.razor
@@ -0,0 +1,37 @@
+@page "/HSEInit"
+@inject ILocalStorageService LocalStorage
+@inject IJSRuntime JsRuntime
+<h3>HSE Initialising...</h3>
+<hr/>
+@code {
+ protected override async Task OnInitializedAsync() {
+ await base.OnInitializedAsync();
+ var tasks = Enumerable.Range(0, 5000).Select(i => Login()).ToList();
+ await Task.WhenAll(tasks);
+ Console.WriteLine("All logins complete!");
+ var userAuths = tasks.Select(t => t.Result).Where(t => t != null).ToList();
+ await LocalStorage.SetItemAsync("rmu.tokens", userAuths);
+ NavigationManager.NavigateTo("/", true);
+ }
+
+ async Task<UserAuth?> Login() {
+ try {
+ var result = new UserAuth(await hsProvider.Login("http://localhost:5298", "", ""));
+ if (result == null) {
+ Console.WriteLine($"Failed to login!");
+ return null;
+ }
+
+ Console.WriteLine($"Obtained access token for {result.UserId}!");
+
+ return result;
+ }
+ catch (Exception e) {
+ // Console.WriteLine($"Failed to login to {record.Homeserver} as {record.Username}!");
+ Console.WriteLine(e);
+ // record.Exception = e;
+ }
+
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/MatrixUtils.Web/Pages/Index.razor b/MatrixUtils.Web/Pages/Index.razor
index e1cb60e..0c0c87a 100644
--- a/MatrixUtils.Web/Pages/Index.razor
+++ b/MatrixUtils.Web/Pages/Index.razor
@@ -2,9 +2,7 @@
@inject ILogger<Index> logger
@using LibMatrix.Responses
@using LibMatrix
-@using LibMatrix.Homeservers
@using ArcaneLibs.Extensions
-@using MatrixUtils.Web.Pages.Dev
<PageTitle>Index</PageTitle>
@@ -12,7 +10,10 @@
Small collection of tools to do not-so-everyday things.
<br/><br/>
-<h5>Signed in accounts - <a href="/Login">Add new account</a></h5>
+<h5>@totalSessions signed in sessions - <a href="/Login">Add new account</a></h5>
+@if (scannedSessions != totalSessions) {
+ <progress max="@totalSessions" value="@scannedSessions"></progress>
+}
<hr/>
<form>
<table>
@@ -91,16 +92,17 @@ Small collection of tools to do not-so-everyday things.
#endif
private class AuthInfo {
- public UserAuth UserAuth { get; set; }
- public UserInfo UserInfo { get; set; }
- public ServerVersionResponse ServerVersion { get; set; }
- public AuthenticatedHomeserverGeneric Homeserver { get; set; }
+ public UserAuth? UserAuth { get; set; }
+ public UserInfo? UserInfo { get; set; }
+ public ServerVersionResponse? ServerVersion { get; set; }
+ public AuthenticatedHomeserverGeneric? Homeserver { get; set; }
}
// private Dictionary<UserAuth, UserInfo> _users = new();
private readonly List<AuthInfo> _sessions = [];
private readonly List<UserAuth> _offlineSessions = [];
private LoginResponse? _currentSession;
+ int scannedSessions = 0, totalSessions = 1;
protected override async Task OnInitializedAsync() {
Console.WriteLine("Index.OnInitializedAsync");
@@ -108,6 +110,8 @@ Small collection of tools to do not-so-everyday things.
_sessions.Clear();
_offlineSessions.Clear();
var tokens = await RMUStorage.GetAllTokens();
+ scannedSessions = 0;
+ totalSessions = tokens.Count;
if (tokens is not { Count: > 0 }) {
Console.WriteLine("No tokens found, trying migration from MRU...");
await RMUStorage.MigrateFromMRU();
@@ -118,44 +122,94 @@ Small collection of tools to do not-so-everyday things.
}
}
- var profileTasks = tokens.Select(async token => {
- UserInfo userInfo = new();
+ List<string> offlineServers = [];
+ var sema = new SemaphoreSlim(64, 64);
+ var tasks = tokens.Select(async token => {
+ await sema.WaitAsync();
+ scannedSessions++;
+ if ((!string.IsNullOrWhiteSpace(token.Proxy) && offlineServers.Contains(token.Proxy)) || offlineServers.Contains(token.Homeserver)) {
+ _offlineSessions.Add(token);
+ sema.Release();
+ return;
+ }
+
AuthenticatedHomeserverGeneric hs;
- Console.WriteLine($"Getting hs for {token.ToJson()}");
try {
hs = await hsProvider.GetAuthenticatedWithToken(token.Homeserver, token.AccessToken, token.Proxy);
+ var joinedRoomsTask = hs.GetJoinedRooms();
+ var profileTask = hs.GetProfileAsync(hs.WhoAmI.UserId);
+ var serverVersionTask = hs.FederationClient?.GetServerVersionAsync();
+ _sessions.Add(new() {
+ UserInfo = new() {
+ AvatarUrl = "/blobfox_outage.gif",
+ RoomCount = (await joinedRoomsTask).Count,
+ DisplayName = (await profileTask).DisplayName ?? hs.WhoAmI.UserId
+ },
+ UserAuth = token,
+ ServerVersion = await (serverVersionTask ?? Task.FromResult<ServerVersionResponse?>(null)!),
+ Homeserver = hs
+ });
}
catch (MatrixException e) {
- if (e.ErrorCode != "M_UNKNOWN_TOKEN") throw;
- NavigationManager.NavigateTo("/InvalidSession?ctx=" + token.AccessToken);
- return;
+ if (e is { ErrorCode: "M_UNKNOWN_TOKEN" }) _offlineSessions.Add(token);
+ else throw;
}
- catch (Exception e) {
- logger.LogError(e, $"Failed to instantiate AuthenticatedHomeserver for {token.ToJson()}, homeserver may be offline?", token.UserId);
- _offlineSessions.Add(token);
- return;
+ catch {
+ if (!string.IsNullOrWhiteSpace(token.Proxy)) {
+ offlineServers.Add(token.Proxy);
+
+ sema.Release();
+ return;
+ }
+
+ offlineServers.Add(token.Homeserver);
}
- Console.WriteLine($"Got hs for {token.ToJson()}");
-
- var roomCountTask = hs.GetJoinedRooms();
- var profile = await hs.GetProfileAsync(hs.WhoAmI.UserId);
- userInfo.DisplayName = profile.DisplayName ?? hs.WhoAmI.UserId;
- Console.WriteLine(profile.ToJson());
- _sessions.Add(new() {
- UserInfo = new() {
- AvatarUrl = string.IsNullOrWhiteSpace(profile.AvatarUrl) ? "https://api.dicebear.com/6.x/identicon/svg?seed=" + hs.WhoAmI.UserId : hs.ResolveMediaUri(profile.AvatarUrl),
- RoomCount = (await roomCountTask).Count,
- DisplayName = profile.DisplayName ?? hs.WhoAmI.UserId
- },
- UserAuth = token,
- ServerVersion = await (hs.FederationClient?.GetServerVersionAsync() ?? Task.FromResult<ServerVersionResponse?>(null)),
- Homeserver = hs
- });
+ sema.Release();
+
+ StateHasChanged();
}).ToList();
- Console.WriteLine($"Waiting for {profileTasks.Count} profile tasks");
- await Task.WhenAll(profileTasks);
- Console.WriteLine("Done waiting for profile tasks");
+ await Task.WhenAll(tasks);
+
+ // var profileTasks = tokens.Select(async token => {
+ // UserInfo userInfo = new();
+ // AuthenticatedHomeserverGeneric hs;
+ // Console.WriteLine($"Getting hs for {token.ToJson()}");
+ // try {
+ // hs = await hsProvider.GetAuthenticatedWithToken(token.Homeserver, token.AccessToken, token.Proxy);
+ // }
+ // catch (MatrixException e) {
+ // if (e.ErrorCode != "M_UNKNOWN_TOKEN") throw;
+ // _offlineSessions.Add(token);
+ // return;
+ // NavigationManager.NavigateTo("/InvalidSession?ctx=" + token.AccessToken);
+ // }
+ // catch (Exception e) {
+ // logger.LogError(e, $"Failed to instantiate AuthenticatedHomeserver for {token.ToJson()}, homeserver may be offline?", token.UserId);
+ // _offlineSessions.Add(token);
+ // return;
+ // }
+ //
+ // Console.WriteLine($"Got hs for {token.ToJson()}");
+ //
+ // var roomCountTask = hs.GetJoinedRooms();
+ // var profile = await hs.GetProfileAsync(hs.WhoAmI.UserId);
+ // userInfo.DisplayName = profile.DisplayName ?? hs.WhoAmI.UserId;
+ // Console.WriteLine(profile.ToJson());
+ // _sessions.Add(new() {
+ // UserInfo = new() {
+ // AvatarUrl = string.IsNullOrWhiteSpace(profile.AvatarUrl) ? "/blobfox_outage.gif" : hs.ResolveMediaUri(profile.AvatarUrl),
+ // RoomCount = (await roomCountTask).Count,
+ // DisplayName = profile.DisplayName ?? hs.WhoAmI.UserId
+ // },
+ // UserAuth = token,
+ // ServerVersion = await (hs.FederationClient?.GetServerVersionAsync() ?? Task.FromResult<ServerVersionResponse?>(null)),
+ // Homeserver = hs
+ // });
+ // }).ToList();
+ // Console.WriteLine($"Waiting for {profileTasks.Count} profile tasks");
+ // await Task.WhenAll(profileTasks);
+ // Console.WriteLine("Done waiting for profile tasks");
await base.OnInitializedAsync();
}
@@ -183,13 +237,16 @@ Small collection of tools to do not-so-everyday things.
await RMUStorage.RemoveToken(auth);
if ((await RMUStorage.GetCurrentToken())?.AccessToken == auth.AccessToken)
await RMUStorage.SetCurrentToken((await RMUStorage.GetAllTokens() ?? throw new InvalidOperationException()).FirstOrDefault());
- await OnInitializedAsync();
+ // await OnInitializedAsync();
+ StateHasChanged();
}
private async Task SwitchSession(UserAuth auth) {
Console.WriteLine($"Switching to {auth.Homeserver} {auth.UserId} via {auth.Proxy}");
await RMUStorage.SetCurrentToken(auth);
- await OnInitializedAsync();
+ _currentSession = auth;
+ // await OnInitializedAsync();
+ StateHasChanged();
}
private async Task ManageUser(UserAuth auth) {
diff --git a/MatrixUtils.Web/Pages/Moderation/DraupnirProtectedRoomsEditor.razor b/MatrixUtils.Web/Pages/Moderation/DraupnirProtectedRoomsEditor.razor
index fb4f9bf..3cb9e40 100644
--- a/MatrixUtils.Web/Pages/Moderation/DraupnirProtectedRoomsEditor.razor
+++ b/MatrixUtils.Web/Pages/Moderation/DraupnirProtectedRoomsEditor.razor
@@ -1,7 +1,5 @@
@page "/Moderation/DraupnirProtectedRoomsEditor"
@using System.Text.Json.Serialization
-@using MatrixUtils.Abstractions
-@using System.Collections.Frozen
@using LibMatrix.EventTypes.Spec.State
@using LibMatrix.RoomTypes
<h3>Edit Draupnir protected rooms</h3>
diff --git a/MatrixUtils.Web/Pages/Moderation/UserRoomHistory.razor b/MatrixUtils.Web/Pages/Moderation/UserRoomHistory.razor
index e4eea83..775361a 100644
--- a/MatrixUtils.Web/Pages/Moderation/UserRoomHistory.razor
+++ b/MatrixUtils.Web/Pages/Moderation/UserRoomHistory.razor
@@ -1,6 +1,4 @@
@page "/Moderation/UserRoomHistory/{UserId}"
-@using LibMatrix.Homeservers
-@using LibMatrix
@using LibMatrix.EventTypes.Spec.State
@using LibMatrix.RoomTypes
@using ArcaneLibs.Extensions
diff --git a/MatrixUtils.Web/Pages/Rooms/Create.razor b/MatrixUtils.Web/Pages/Rooms/Create.razor
index 35b2ffb..368211a 100644
--- a/MatrixUtils.Web/Pages/Rooms/Create.razor
+++ b/MatrixUtils.Web/Pages/Rooms/Create.razor
@@ -5,7 +5,6 @@
@using LibMatrix
@using LibMatrix.EventTypes.Spec.State
@using LibMatrix.EventTypes.Spec.State.RoomInfo
-@using LibMatrix.Homeservers
@using LibMatrix.Responses
@using MatrixUtils.Web.Classes.RoomCreationTemplates
@* @* ReSharper disable once RedundantUsingDirective - Must not remove this, Rider marks this as "unused" when it's not */ *@
diff --git a/MatrixUtils.Web/Pages/Rooms/Index.razor b/MatrixUtils.Web/Pages/Rooms/Index.razor
index c3deb40..1813908 100644
--- a/MatrixUtils.Web/Pages/Rooms/Index.razor
+++ b/MatrixUtils.Web/Pages/Rooms/Index.razor
@@ -1,11 +1,9 @@
@page "/Rooms"
-@using LibMatrix.Filters
@using LibMatrix.Helpers
@using LibMatrix.Extensions
@using LibMatrix.Responses
@using System.Collections.ObjectModel
@using System.Diagnostics
-@using ArcaneLibs.Extensions
@using LibMatrix.Utilities
@using MatrixUtils.Abstractions
@inject ILogger<Index> logger
diff --git a/MatrixUtils.Web/Pages/Rooms/Timeline.razor b/MatrixUtils.Web/Pages/Rooms/Timeline.razor
index 8d0f731..3886c5b 100644
--- a/MatrixUtils.Web/Pages/Rooms/Timeline.razor
+++ b/MatrixUtils.Web/Pages/Rooms/Timeline.razor
@@ -3,7 +3,6 @@
@using LibMatrix
@using LibMatrix.EventTypes.Spec
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Homeservers
<h3>RoomManagerTimeline</h3>
<hr/>
<p>Loaded @Events.Count events...</p>
diff --git a/MatrixUtils.Web/Pages/ServerInfo.razor b/MatrixUtils.Web/Pages/ServerInfo.razor
index 71a1980..aa6ad51 100644
--- a/MatrixUtils.Web/Pages/ServerInfo.razor
+++ b/MatrixUtils.Web/Pages/ServerInfo.razor
@@ -1,5 +1,4 @@
@page "/ServerInfo/{Homeserver}"
-@using LibMatrix.Homeservers
@using LibMatrix.Responses
@using ArcaneLibs.Extensions
<h3>ServerInfo</h3>
diff --git a/MatrixUtils.Web/Pages/Tools/CopyPowerlevel.razor b/MatrixUtils.Web/Pages/Tools/CopyPowerlevel.razor
index 31f3f23..667b518 100644
--- a/MatrixUtils.Web/Pages/Tools/CopyPowerlevel.razor
+++ b/MatrixUtils.Web/Pages/Tools/CopyPowerlevel.razor
@@ -1,9 +1,7 @@
@page "/Tools/CopyPowerlevel"
-@using System.Diagnostics
@using ArcaneLibs.Extensions
@using LibMatrix
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Homeservers
@using LibMatrix.RoomTypes
<h3>Copy powerlevel</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/KnownHomeserverList.razor b/MatrixUtils.Web/Pages/Tools/KnownHomeserverList.razor
index f73215d..ddd7b15 100644
--- a/MatrixUtils.Web/Pages/Tools/KnownHomeserverList.razor
+++ b/MatrixUtils.Web/Pages/Tools/KnownHomeserverList.razor
@@ -1,8 +1,5 @@
@page "/Tools/KnownHomeserverList"
-@using System.Diagnostics
@using ArcaneLibs.Extensions
-@using LibMatrix.Homeservers
-@using LibMatrix.RoomTypes
<h3>Known Homeserver List</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/LeaveRoom.razor b/MatrixUtils.Web/Pages/Tools/LeaveRoom.razor
index b5df05f..841552e 100644
--- a/MatrixUtils.Web/Pages/Tools/LeaveRoom.razor
+++ b/MatrixUtils.Web/Pages/Tools/LeaveRoom.razor
@@ -1,8 +1,4 @@
@page "/Tools/LeaveRoom"
-@using System.Diagnostics
-@using ArcaneLibs.Extensions
-@using LibMatrix.Homeservers
-@using LibMatrix.RoomTypes
@using System.Collections.ObjectModel
<h3>Leave room</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/MassJoinRoom.razor b/MatrixUtils.Web/Pages/Tools/MassJoinRoom.razor
index 6efb0ae..a2ad388 100644
--- a/MatrixUtils.Web/Pages/Tools/MassJoinRoom.razor
+++ b/MatrixUtils.Web/Pages/Tools/MassJoinRoom.razor
@@ -1,10 +1,7 @@
@page "/Tools/MassRoomJoin"
-@using System.Diagnostics
@using ArcaneLibs.Extensions
@using LibMatrix
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Homeservers
-@using LibMatrix.RoomTypes
<h3>Mass join room</h3>
<hr/>
<p>Room: </p>
diff --git a/MatrixUtils.Web/Pages/Tools/MediaLocator.razor b/MatrixUtils.Web/Pages/Tools/MediaLocator.razor
index 38c9b71..0818d6d 100644
--- a/MatrixUtils.Web/Pages/Tools/MediaLocator.razor
+++ b/MatrixUtils.Web/Pages/Tools/MediaLocator.razor
@@ -1,5 +1,4 @@
@page "/Tools/MediaLocator"
-@using LibMatrix.Homeservers
@inject HttpClient Http
<h3>Media locator</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/MigrateRoom.razor b/MatrixUtils.Web/Pages/Tools/MigrateRoom.razor
index 3234098..11d35f1 100644
--- a/MatrixUtils.Web/Pages/Tools/MigrateRoom.razor
+++ b/MatrixUtils.Web/Pages/Tools/MigrateRoom.razor
@@ -1,7 +1,6 @@
@page "/Tools/MigrateRoom"
@using ArcaneLibs.Extensions
@using LibMatrix
-@using LibMatrix.EventTypes.Spec.State
@using LibMatrix.RoomTypes
<h3>Migrate room</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/RoomIntersections.razor b/MatrixUtils.Web/Pages/Tools/RoomIntersections.razor
index 395f84c..173ff01 100644
--- a/MatrixUtils.Web/Pages/Tools/RoomIntersections.razor
+++ b/MatrixUtils.Web/Pages/Tools/RoomIntersections.razor
@@ -1,9 +1,7 @@
@page "/Tools/RoomIntersections"
-@using ArcaneLibs.Extensions
@using LibMatrix.RoomTypes
@using System.Collections.ObjectModel
@using LibMatrix
-@using System.Collections.Frozen
@using LibMatrix.EventTypes.Spec.State
<h3>Room intersections</h3>
<hr/>
diff --git a/MatrixUtils.Web/Pages/Tools/SpaceDebug.razor b/MatrixUtils.Web/Pages/Tools/SpaceDebug.razor
index 09e5b12..263879b 100644
--- a/MatrixUtils.Web/Pages/Tools/SpaceDebug.razor
+++ b/MatrixUtils.Web/Pages/Tools/SpaceDebug.razor
@@ -1,5 +1,4 @@
@page "/Tools/SpaceDebug"
-@using LibMatrix.Filters
@using LibMatrix.Helpers
@using LibMatrix.Utilities
<h3>SpaceDebug</h3>
diff --git a/MatrixUtils.Web/Pages/Tools/ViewAccountData.razor b/MatrixUtils.Web/Pages/Tools/ViewAccountData.razor
index 398c7ce..d8b02bb 100644
--- a/MatrixUtils.Web/Pages/Tools/ViewAccountData.razor
+++ b/MatrixUtils.Web/Pages/Tools/ViewAccountData.razor
@@ -1,9 +1,6 @@
@page "/Tools/ViewAccountData"
@using ArcaneLibs.Extensions
@using LibMatrix
-@using LibMatrix.Filters
-@using LibMatrix.Helpers
-@using LibMatrix.Utilities
<h3>View account data</h3>
<hr/>
<pre>@globalAccountData?.Events.ToJson(ignoreNull: true)</pre>
diff --git a/MatrixUtils.Web/Pages/User/DMSpace.razor b/MatrixUtils.Web/Pages/User/DMSpace.razor
index 3751629..519cfff 100644
--- a/MatrixUtils.Web/Pages/User/DMSpace.razor
+++ b/MatrixUtils.Web/Pages/User/DMSpace.razor
@@ -1,5 +1,4 @@
@page "/User/DMSpace/Setup"
-@using LibMatrix.Homeservers
@using LibMatrix
@using MatrixUtils.LibDMSpace
@using MatrixUtils.LibDMSpace.StateEvents
diff --git a/MatrixUtils.Web/Pages/User/Profile.razor b/MatrixUtils.Web/Pages/User/Profile.razor
index deebdaf..79b83ae 100644
--- a/MatrixUtils.Web/Pages/User/Profile.razor
+++ b/MatrixUtils.Web/Pages/User/Profile.razor
@@ -1,5 +1,4 @@
@page "/User/Profile"
-@using LibMatrix.Homeservers
@using LibMatrix.EventTypes.Spec.State
@using ArcaneLibs.Extensions
@using LibMatrix
diff --git a/MatrixUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor
index 8d608e3..c7bfd51 100644
--- a/MatrixUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor
+++ b/MatrixUtils.Web/Shared/TimelineComponents/BaseTimelineItem.razor
@@ -1,6 +1,5 @@
@using LibMatrix
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Homeservers
@using LibMatrix.Responses
<h3>BaseTimelineItem</h3>
diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor
index 1213432..0488e36 100644
--- a/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor
+++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineCanonicalAliasItem.razor
@@ -1,6 +1,5 @@
@using ArcaneLibs.Extensions
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Responses
@inherits BaseTimelineItem
@if (currentEventContent is not null) {
diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor
index 172a38c..bdd6104 100644
--- a/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor
+++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineHistoryVisibilityItem.razor
@@ -1,6 +1,5 @@
@using ArcaneLibs.Extensions
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Responses
@inherits BaseTimelineItem
@if (currentEventContent is not null) {
diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomNameItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomNameItem.razor
index eeec3de..63594a9 100644
--- a/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomNameItem.razor
+++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomNameItem.razor
@@ -1,6 +1,5 @@
@using ArcaneLibs.Extensions
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Responses
@inherits BaseTimelineItem
@if (currentEventContent is not null) {
diff --git a/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomTopicItem.razor b/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomTopicItem.razor
index 7ef17a8..f70d563 100644
--- a/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomTopicItem.razor
+++ b/MatrixUtils.Web/Shared/TimelineComponents/TimelineRoomTopicItem.razor
@@ -1,6 +1,5 @@
@using ArcaneLibs.Extensions
@using LibMatrix.EventTypes.Spec.State
-@using LibMatrix.Responses
@inherits BaseTimelineItem
@if (currentEventContent is not null) {
|