fix(web): tolerate Telegram notification failures on session edit
Deploy Telegram Bot / build-and-push (push) Successful in 23m1s
Deploy Telegram Bot / deploy (push) Has been cancelled
Deploy Telegram Bot / scan-images (push) Has been cancelled

- Wrap the group notification in UpdateSessionAsync with try/catch so a
  missing/unreachable chat does not roll back a Web dashboard edit.
- Update E2E dashboard test to use production schema (public.*), 1920x1080
  viewport, direct edit navigation, and mobile-card delete locator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-16 15:04:22 +03:00
parent 747bd76c3e
commit 836d74f43b
2 changed files with 38 additions and 30 deletions
+12 -5
View File
@@ -1075,11 +1075,18 @@ public sealed class SessionService(
"\n" +
$"👥 Мест: <b>{(maxPlayers.HasValue ? maxPlayers.Value.ToString(System.Globalization.CultureInfo.InvariantCulture) : "без лимита")}</b>";
await bot.SendMessage(
chatId: oldSession.TelegramChatId,
messageThreadId: oldSession.ThreadId,
text: notification,
parseMode: Telegram.Bot.Types.Enums.ParseMode.Html);
try
{
await bot.SendMessage(
chatId: oldSession.TelegramChatId,
messageThreadId: oldSession.ThreadId,
text: notification,
parseMode: Telegram.Bot.Types.Enums.ParseMode.Html);
}
catch (Exception ex)
{
logger.LogWarning(ex, "Failed to send session update notification to chat {ChatId} for session {SessionId}", oldSession.TelegramChatId, sessionId);
}
var mode = SessionNotificationModeExtensions.FromDatabaseValue(oldSession.NotificationMode);
if (mode.ShouldSendDirectMessages())