Migrate to Telegram.Bot v22 and some minor improvements

This commit is contained in:
2024-11-05 17:25:29 +03:30
parent 0830847336
commit 51747b3e3d
11 changed files with 53 additions and 31 deletions

View File

@@ -9,12 +9,11 @@ namespace mstdnCats.Services
{
// Setup DB
IDocumentCollection<Post>? collection = null;
if (_dbname != null)
{
try
{
// Initialize DB
var store = new DataStore($"{_dbname}.json", minifyJson: false);
var store = new DataStore($"{_dbname}.json", minifyJson: true);
collection = store.GetCollection<Post>();
}
catch
@@ -24,8 +23,6 @@ namespace mstdnCats.Services
// Return collection
return Task.FromResult(collection);
}
return Task.FromResult(collection);
}
}
}