Renamed OnUpdate => OnUpdates (with temporary compatibility shim)

This commit is contained in:
Wizou 2024-03-29 16:42:58 +01:00
parent 270a7d89e6
commit 3d224afb23
12 changed files with 49 additions and 52 deletions

View file

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using TL;
@ -15,10 +13,10 @@ namespace WTelegramClientTest
Console.WriteLine("The program will download photos/medias from messages you send/forward to yourself (Saved Messages)");
using var client = new WTelegram.Client(Environment.GetEnvironmentVariable);
var user = await client.LoginUserIfNeeded();
client.OnUpdate += Client_OnUpdate;
client.OnUpdates += Client_OnUpdates;
Console.ReadKey();
async Task Client_OnUpdate(UpdatesBase updates)
async Task Client_OnUpdates(UpdatesBase updates)
{
foreach (var update in updates.UpdateList)
{