feat: improve telegram session posts
Deploy Telegram Bot / build-and-push (push) Successful in 4m28s
Deploy Telegram Bot / deploy (push) Successful in 11s

This commit is contained in:
2026-05-04 09:52:07 +03:00
parent 25c22b2ff5
commit aefed5abd4
18 changed files with 271 additions and 74 deletions
@@ -16,7 +16,7 @@ public sealed record CancelSessionCommand(
int MessageId);
// DTOs for AOT compilation
internal sealed record CancelSessionInfoDto(string Title, Guid BatchId, bool CanManage, string NotificationMode);
internal sealed record CancelSessionInfoDto(string Title, Guid BatchId, int? BatchMessageId, bool CanManage, string NotificationMode);
public sealed class CancelSessionHandler(
NpgsqlDataSource dataSource,
@@ -34,6 +34,7 @@ public sealed class CancelSessionHandler(
"""
SELECT s.title AS Title,
s.batch_id AS BatchId,
s.batch_message_id AS BatchMessageId,
s.notification_mode AS NotificationMode,
EXISTS (
SELECT 1
@@ -107,7 +108,7 @@ public sealed class CancelSessionHandler(
{
await bot.EditMessageText(
chatId: command.ChatId,
messageId: command.MessageId,
messageId: session.BatchMessageId ?? command.MessageId,
text: renderResult.Text,
parseMode: Telegram.Bot.Types.Enums.ParseMode.Html,
replyMarkup: renderResult.Markup,