about summary refs log tree commit diff
path: root/Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-02-03 19:06:08 +0100
committerRory& <root@rory.gay>2025-02-03 19:06:08 +0100
commit040c244d35ff42b59993c85a5110d4e7aedc0237 (patch)
treed3d42436cc40a2f09b8dec87624ef45ea9acd2d7 /Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs
parentThe rest of warning cleanup so far. (diff)
downloadLibMatrix-040c244d35ff42b59993c85a5110d4e7aedc0237.tar.xz
Some code cleanup
Diffstat (limited to 'Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs')
-rw-r--r--Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs b/Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs

index 1e08d28..d1b0a30 100644 --- a/Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs +++ b/Utilities/LibMatrix.HomeserverEmulator/Services/UserStore.cs
@@ -12,14 +12,14 @@ namespace LibMatrix.HomeserverEmulator.Services; public class UserStore { public ConcurrentBag<User> _users = new(); - private readonly HSEConfiguration _config; + private readonly HseConfiguration _config; private readonly RoomStore _roomStore; - public UserStore(HSEConfiguration config, RoomStore roomStore) { + public UserStore(HseConfiguration config, RoomStore roomStore) { _config = config; _roomStore = roomStore; if (config.StoreData) { - var dataDir = Path.Combine(HSEConfiguration.Current.DataStoragePath, "users"); + var dataDir = Path.Combine(HseConfiguration.Current.DataStoragePath, "users"); if (!Directory.Exists(dataDir)) Directory.CreateDirectory(dataDir); foreach (var userId in Directory.GetDirectories(dataDir)) { var tokensDir = Path.Combine(dataDir, userId, "tokens.json"); @@ -207,12 +207,12 @@ public class UserStore { public bool IsGuest { get; set; } public async Task SaveDebounced() { - if (!HSEConfiguration.Current.StoreData) return; + if (!HseConfiguration.Current.StoreData) return; await _debounceCts.CancelAsync(); _debounceCts = new CancellationTokenSource(); try { await Task.Delay(250, _debounceCts.Token); - var dataDir = Path.Combine(HSEConfiguration.Current.DataStoragePath, "users", _userId); + var dataDir = Path.Combine(HseConfiguration.Current.DataStoragePath, "users", _userId); if (!Directory.Exists(dataDir)) Directory.CreateDirectory(dataDir); var tokensDir = Path.Combine(dataDir, "tokens.json"); var path = Path.Combine(dataDir, $"user.json");