Skip to content

Commit

Permalink
register ITelegramBotClient as singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
granstel committed Jun 11, 2024
1 parent a38dec2 commit 449c951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dodo1000Bot.Messengers.Telegram/TelegramStartup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void Configure(IWebHostBuilder builder)
services.AddConfiguration<TelegramConfiguration>("appsettings.Telegram.json", Source.Telegram.ToString());

services.AddTransient<ITelegramService, TelegramService>();
services.AddTransient<ITelegramBotClient>(RegisterTelegramClient);
services.AddSingleton<ITelegramBotClient>(RegisterTelegramClient);
services.AddTransient<INotifyService, TelegramNotifyService>();

services.Configure<Microsoft.AspNetCore.Mvc.JsonOptions>(options =>
Expand Down

0 comments on commit 449c951

Please sign in to comment.