mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-06 23:14:01 +00:00
more IAsyncDisposable stuff
This commit is contained in:
parent
9fe6a9d74f
commit
be7027b318
6 changed files with 10 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ namespace WTelegramClientTest
|
|||
var store = new PostgreStore(Environment.GetEnvironmentVariable("DATABASE_URL"), Environment.GetEnvironmentVariable("SESSION_NAME"));
|
||||
// if DB does not contain a session yet, client will be run in interactive mode
|
||||
Client = new WTelegram.Client(store.Length == 0 ? null : Environment.GetEnvironmentVariable, store);
|
||||
using (Client)
|
||||
await using (Client)
|
||||
{
|
||||
Client.OnUpdates += Client_OnUpdates;
|
||||
My = await Client.LoginUserIfNeeded();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue