diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-23 08:51:02 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-05-23 08:51:02 +0200 |
commit | 3ef3e5caa65458e595e2303358322626c7da1dda (patch) | |
tree | 6a60d401da8b5f906a423601ac4c135d44e896d1 /MatrixRoomUtils.Core/AuthenticatedHomeServer.cs | |
parent | Local changes (diff) | |
download | MatrixUtils-3ef3e5caa65458e595e2303358322626c7da1dda.tar.xz |
Add numerous new things
Diffstat (limited to 'MatrixRoomUtils.Core/AuthenticatedHomeServer.cs')
-rw-r--r-- | MatrixRoomUtils.Core/AuthenticatedHomeServer.cs | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs b/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs index 6f5df39..7a1f5de 100644 --- a/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs +++ b/MatrixRoomUtils.Core/AuthenticatedHomeServer.cs @@ -9,12 +9,14 @@ public class AuthenticatedHomeServer : IHomeServer { public string UserId { get; set; } public string AccessToken { get; set; } + public readonly HomeserverAdminApi Admin; public AuthenticatedHomeServer(string userId, string accessToken, string canonicalHomeServerDomain) { UserId = userId; AccessToken = accessToken; HomeServerDomain = canonicalHomeServerDomain; + Admin = new HomeserverAdminApi(this); _httpClient = new HttpClient(); } @@ -56,9 +58,25 @@ public class AuthenticatedHomeServer : IHomeServer return rooms; } - - public async Task<string> ResolveMediaUri(string mxc) + + + + + + public class HomeserverAdminApi { - return mxc.Replace("mxc://", $"{FullHomeServerDomain}/_matrix/media/r0/download/"); + private readonly AuthenticatedHomeServer _authenticatedHomeServer; + + public HomeserverAdminApi(AuthenticatedHomeServer authenticatedHomeServer) + { + _authenticatedHomeServer = authenticatedHomeServer; + } + + + + + + + } -} \ No newline at end of file +} |