Доработан адаптер телеграма
All checks were successful
CI / build-test (push) Successful in 36s
Release / pack-and-publish (release) Successful in 39s

This commit is contained in:
2025-12-05 19:54:22 +03:00
parent 634a9292dc
commit 5085958219
6 changed files with 23 additions and 21 deletions

View File

@@ -12,11 +12,15 @@ public static class BotPagesAppExtension
/// </summary>
/// <param name="app"></param>
/// <param name="token"></param>
/// <param name="messengerType"></param>
/// <returns></returns>
public static BotPagesApp AddTelegramAdapter(this BotPagesApp app, string token)
public static BotPagesApp AddTelegramAdapter(this BotPagesApp app, string token, string messengerType = "")
{
var telegram = new TelegramAdapter(app.Logger, token);
app.AddAdapter(telegram.MessagerType, telegram);
if (!string.IsNullOrWhiteSpace(messengerType)) telegram.MessengerType = messengerType;
app.AddAdapter(telegram.MessengerType, telegram);
return app;
}
}