Убраны старые api
This commit is contained in:
@@ -8,7 +8,7 @@ namespace Demo.Pages;
|
||||
[Route("FileSend")]
|
||||
public sealed class FileSendPage : SingletonPage
|
||||
{
|
||||
public override Task OnEnter(PageContext ctx, CancellationToken ct)
|
||||
public override async Task OnEnter(PageContext ctx, CancellationToken ct)
|
||||
{
|
||||
var content = "Hello from BotPages! This file is generated on the fly.";
|
||||
var stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(content));
|
||||
@@ -23,9 +23,11 @@ public sealed class FileSendPage : SingletonPage
|
||||
GetStreamAsync = _ => Task.FromResult<Stream>(stream)
|
||||
};
|
||||
|
||||
return new MessageBuilder(ctx)
|
||||
await new MessageBuilder(ctx)
|
||||
.Text("Вот пример отправки нового файла 📎", MessageFormat.Markdown)
|
||||
.File(demoFile, "Демонстрационный файл")
|
||||
.SendAsync(ct);
|
||||
|
||||
await ctx.GoToHomeAsync(ct);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user