diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-30 03:36:58 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-30 03:36:58 +0200 |
commit | bb8c2637af3b7982e7a4b2fd15e2fbec613d0848 (patch) | |
tree | b8075ba7e507aad3f96f354712ad920ac421e474 /MatrixRoomUtils.Core/AuthenticatedHomeServer.cs | |
parent | Update stuff (diff) | |
download | MatrixUtils-bb8c2637af3b7982e7a4b2fd15e2fbec613d0848.tar.xz |
Todays progress
Diffstat (limited to 'MatrixRoomUtils.Core/AuthenticatedHomeServer.cs')
-rw-r--r-- | MatrixRoomUtils.Core/AuthenticatedHomeServer.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs b/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs index 10bbb36..09da766 100644 --- a/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs +++ b/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs @@ -28,7 +28,7 @@ public class AuthenticatedHomeServer : IHomeServer { } public WhoAmIResponse WhoAmI { get; set; } = null!; - public string UserId { get; } + public string UserId => WhoAmI.UserId; public string AccessToken { get; set; } @@ -80,7 +80,7 @@ public class AuthenticatedHomeServer : IHomeServer { var url = $"/_synapse/admin/v1/rooms?limit={Math.Min(limit, 100)}&dir={dir}&order_by={orderBy}"; if (!string.IsNullOrEmpty(searchTerm)) url += $"&search_term={searchTerm}"; - if (res?.NextBatch != null) url += $"&from={res.NextBatch}"; + if (res?.NextBatch is not null) url += $"&from={res.NextBatch}"; Console.WriteLine($"--- ADMIN Querying Room List with URL: {url} - Already have {i} items... ---"); @@ -88,7 +88,7 @@ public class AuthenticatedHomeServer : IHomeServer { totalRooms ??= res?.TotalRooms; Console.WriteLine(res.ToJson(false)); foreach (var room in res.Rooms) { - if (localFilter != null) { + if (localFilter is not null) { if (!room.RoomId.Contains(localFilter.RoomIdContains)) { totalRooms--; continue; @@ -144,7 +144,7 @@ public class AuthenticatedHomeServer : IHomeServer { continue; } } - // if (contentSearch != null && !string.IsNullOrEmpty(contentSearch) && + // if (contentSearch is not null && !string.IsNullOrEmpty(contentSearch) && // !( // room.Name?.Contains(contentSearch, StringComparison.InvariantCultureIgnoreCase) == true || // room.CanonicalAlias?.Contains(contentSearch, StringComparison.InvariantCultureIgnoreCase) == true || |