Доработан адаптер телеграма
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user