blob: 586cf88968568b952c0b2ce823f04191cc1e68ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using MatrixRoomUtils.Core.Responses;
namespace MatrixRoomUtils.Core;
public class RuntimeCache
{
public static bool WasLoaded = false;
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 class UserInfo
{
public ProfileResponse Profile { get; set; } = new();
public LoginResponse LoginResponse { get; set; }
public string AccessToken { get => LoginResponse.AccessToken; }
}
public class HomeServerResolutionResult
{
public string Result { get; set; }
public DateTime ResolutionTime { get; set; }
}
|