about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/RuntimeCache.cs
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-04 00:13:25 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-04 00:18:46 +0200
commitb933f7ed1189c7e14d82b4fcf5c98fb3ef4b9cf1 (patch)
tree4176eb2b7f1befca685d00e119d842eb3f07da1f /MatrixRoomUtils.Core/RuntimeCache.cs
parentSmall refactoring (diff)
downloadMatrixUtils-b933f7ed1189c7e14d82b4fcf5c98fb3ef4b9cf1.tar.xz
Refactoring
Diffstat (limited to 'MatrixRoomUtils.Core/RuntimeCache.cs')
-rw-r--r--MatrixRoomUtils.Core/RuntimeCache.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/MatrixRoomUtils.Core/RuntimeCache.cs b/MatrixRoomUtils.Core/RuntimeCache.cs
index 3e9eebc..586cf88 100644
--- a/MatrixRoomUtils.Core/RuntimeCache.cs
+++ b/MatrixRoomUtils.Core/RuntimeCache.cs
@@ -1,18 +1,16 @@
-using MatrixRoomUtils.Authentication;
-using MatrixRoomUtils.Responses;
+using MatrixRoomUtils.Core.Responses;
 
-namespace MatrixRoomUtils;
+namespace MatrixRoomUtils.Core;
 
 public class RuntimeCache
 {
     public static bool WasLoaded = false;
-    public static string AccessToken { get; set; }
-    public static string? CurrentHomeserver { get; set; }
+    public static string? LastUsedToken { get; set; }
     public static AuthenticatedHomeServer CurrentHomeServer { get; set; }
     public static Dictionary<string, UserInfo> LoginSessions { get; set; } = new();
 
     public static Dictionary<string, HomeServerResolutionResult> HomeserverResolutionCache { get; set; } = new();
-    public static Dictionary<string, (DateTime cachedAt, ProfileResponse response)> ProfileCache { get; set; } = new();
+    // public static Dictionary<string, (DateTime cachedAt, ProfileResponse response)> ProfileCache { get; set; } = new();
 }
 
 
@@ -20,7 +18,7 @@ public class UserInfo
 {
     public ProfileResponse Profile { get; set; } = new();
     public LoginResponse LoginResponse { get; set; }
-    public string AccessToken { get; set; }
+    public string AccessToken { get => LoginResponse.AccessToken; }
 }
 
 public class HomeServerResolutionResult