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/Helpers/SyncHelper.cs | |
parent | Update stuff (diff) | |
download | MatrixUtils-bb8c2637af3b7982e7a4b2fd15e2fbec613d0848.tar.xz |
Todays progress
Diffstat (limited to 'MatrixRoomUtils.Core/Helpers/SyncHelper.cs')
-rw-r--r-- | MatrixRoomUtils.Core/Helpers/SyncHelper.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MatrixRoomUtils.Core/Helpers/SyncHelper.cs b/MatrixRoomUtils.Core/Helpers/SyncHelper.cs index 1b9c598..eff412b 100644 --- a/MatrixRoomUtils.Core/Helpers/SyncHelper.cs +++ b/MatrixRoomUtils.Core/Helpers/SyncHelper.cs @@ -20,7 +20,7 @@ public class SyncHelper { public async Task<SyncResult?> Sync(string? since = null, CancellationToken? cancellationToken = null) { var outFileName = "sync-" + - (await _storageService.CacheStorageProvider.GetAllKeys()).Count(x => x.StartsWith("sync")) + + (await _storageService.CacheStorageProvider.GetAllKeysAsync()).Count(x => x.StartsWith("sync")) + ".json"; var url = "/_matrix/client/v3/sync?timeout=30000&set_presence=online"; if (!string.IsNullOrWhiteSpace(since)) url += $"&since={since}"; @@ -29,7 +29,7 @@ public class SyncHelper { try { var res = await _homeServer._httpClient.GetFromJsonAsync<SyncResult>(url, cancellationToken: cancellationToken ?? CancellationToken.None); - await _storageService.CacheStorageProvider.SaveObject(outFileName, res); + await _storageService.CacheStorageProvider.SaveObjectAsync(outFileName, res); Console.WriteLine($"Wrote file: {outFileName}"); return res; } |