diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-04 02:17:10 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-09-04 02:17:10 +0200 |
commit | 21da6cde79ccd0cb7f895a29e3d8cab959ef11ba (patch) | |
tree | fb0b89566b64ae907d7ca3ea8a29adcf0c0361d0 /LibMatrix/Helpers/SyncHelper.cs | |
parent | Clean up some extension functions (diff) | |
download | LibMatrix-21da6cde79ccd0cb7f895a29e3d8cab959ef11ba.tar.xz |
Too many changes to name...
Diffstat (limited to 'LibMatrix/Helpers/SyncHelper.cs')
-rw-r--r-- | LibMatrix/Helpers/SyncHelper.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/LibMatrix/Helpers/SyncHelper.cs b/LibMatrix/Helpers/SyncHelper.cs index b957c0c..de4f3d4 100644 --- a/LibMatrix/Helpers/SyncHelper.cs +++ b/LibMatrix/Helpers/SyncHelper.cs @@ -1,19 +1,26 @@ +using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Net.Http.Json; using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; +using ArcaneLibs.Extensions; using LibMatrix.Extensions; using LibMatrix.Filters; +using LibMatrix.Homeservers; using LibMatrix.Responses; using LibMatrix.Services; namespace LibMatrix.Helpers; public class SyncHelper { - private readonly AuthenticatedHomeServer _homeServer; + private readonly AuthenticatedHomeserverGeneric _homeserver; private readonly TieredStorageService _storageService; - public SyncHelper(AuthenticatedHomeServer homeServer, TieredStorageService storageService) { - _homeServer = homeServer; + public SyncHelper(AuthenticatedHomeserverGeneric homeserver, TieredStorageService storageService) { + _homeserver = homeserver; _storageService = storageService; } @@ -33,7 +40,7 @@ public class SyncHelper { // else url += "&full_state=true"; Console.WriteLine("Calling: " + url); try { - var req = await _homeServer._httpClient.GetAsync(url, cancellationToken: cancellationToken ?? CancellationToken.None); + var req = await _homeserver._httpClient.GetAsync(url, cancellationToken: cancellationToken ?? CancellationToken.None); // var res = await JsonSerializer.DeserializeAsync<SyncResult>(await req.Content.ReadAsStreamAsync()); |