From 0861d48f5f844d2bcff1007e8a05c6ad9b6ca083 Mon Sep 17 00:00:00 2001 From: ruberoid Date: Sun, 11 May 2025 18:03:43 +0400 Subject: [PATCH] Moved to new version of WTelegram. --- Directory.Packages.props | 12 ++++++------ .../Nocr.TelegramListener.AppServices.csproj | 2 ++ .../UpdateListenerBackgroundService.cs | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9cbcbbb..57f7346 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -10,11 +10,11 @@ - + - - + + @@ -24,10 +24,10 @@ - + - - + + \ No newline at end of file diff --git a/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj b/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj index b49fafe..13e9e2a 100644 --- a/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj +++ b/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj @@ -4,7 +4,9 @@ false + + diff --git a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs index 8f0cdd3..e8da26f 100644 --- a/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs +++ b/src/Nocr.TelegramListener.AppServices/UpdateListeners/UpdateListenerBackgroundService.cs @@ -49,7 +49,7 @@ public sealed class UpdateListenerBackgroundService : BackgroundService if (client != null) { _logger.LogWarning("No activity detected for {Timeout}. Reconnecting...", _activityTimeout); - client.OnUpdate -= HandleUpdates; + client.OnUpdates -= HandleUpdates; client.Dispose(); } @@ -58,7 +58,7 @@ public sealed class UpdateListenerBackgroundService : BackgroundService _telegramClientContainer.Initialize(); client = _telegramClientContainer.Client; - client.OnUpdate += HandleUpdates; + client.OnUpdates += HandleUpdates; var my = await client.LoginUserIfNeeded(); _telegramRegistry.SetMy(my);