fix(web): tolerate Telegram notification failures on session edit
- 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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user