Убраны старые api
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user