Убраны старые api

This commit is contained in:
FrigaT
2025-12-24 16:30:43 +03:00
parent 37cb6599ba
commit 4124e8c554
7 changed files with 66 additions and 150 deletions

View File

@@ -53,7 +53,17 @@ public sealed class TelegramAlbumBuilder : IAlbumBuilder
{
_logger.Log(LogLevel.Warn, "Albums not supported. Degraded to sequential sends.");
foreach (var (file, caption, captionFormat) in _items)
await _adapter.SendFileAsync(_ctx.Update.Chat.Id, file, caption, captionFormat, ct: ct);
{
var req = new SendRequest
{
ChatId = _ctx.Update.Chat.Id,
File = file,
Caption = caption,
CaptionFormat = captionFormat
};
await _ctx.SendAsync(req, ct);
}
return;
}
@@ -95,7 +105,16 @@ public sealed class TelegramAlbumBuilder : IAlbumBuilder
{
// Telegram не поддерживает document в альбомах — деградация
_logger.Log(LogLevel.Warn, $"Document '{file.Kind}' in album not supported. Sending document separately.");
await _adapter.SendFileAsync(_ctx.Update.Chat.Id, file, caption, captionFormat, ct: ct);
var req = new SendRequest
{
ChatId = _ctx.Update.Chat.Id,
File = file,
Caption = caption,
CaptionFormat = captionFormat
};
await _ctx.SendAsync(req, ct);
}
}