From 76e341d4b2e7ce89497ac4291e20ded4f604926e Mon Sep 17 00:00:00 2001 From: Evgenii Burmistrov Date: Mon, 9 Dec 2024 16:52:02 +0300 Subject: [PATCH] also handle EditedMessage --- ClubDoorman/Worker.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ClubDoorman/Worker.cs b/ClubDoorman/Worker.cs index cc91968..0137cbb 100644 --- a/ClubDoorman/Worker.cs +++ b/ClubDoorman/Worker.cs @@ -92,7 +92,7 @@ private async Task UpdateLoop(int offset, CancellationToken stoppingToken) offset, limit: 100, timeout: 100, - allowedUpdates: [UpdateType.Message, UpdateType.ChatMember, UpdateType.CallbackQuery], + allowedUpdates: [UpdateType.Message, UpdateType.EditedMessage, UpdateType.ChatMember, UpdateType.CallbackQuery], cancellationToken: stoppingToken ); if (updates.Length == 0) @@ -135,7 +135,7 @@ private async Task HandleUpdate(Update update, CancellationToken stoppingToken) return; } - var message = update.Message; + var message = update.EditedMessage ?? update.Message; if (message == null) return; var chat = message.Chat;