Skip to content

Commit

Permalink
feat: do not configure Webhook from IHostedService
Browse files Browse the repository at this point in the history
Needed to save some startup time
  • Loading branch information
valchetski committed Sep 3, 2024
1 parent 4f69656 commit 9179de2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 50 deletions.
6 changes: 1 addition & 5 deletions src/Tgvs/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
.AddScoped<IReceiverService, ReceiverService>()
.AddScoped<IUpdateHandler, UpdateHandler>();

if (telegramSection.GetValue<bool>("UseWebhook"))
{
builder.Services.AddHostedService<ConfigureWebhook>();
}
else
if (!telegramSection.GetValue<bool>("UseWebhook"))
{
builder.Services.AddHostedService<PollingService>();
}
Expand Down
43 changes: 0 additions & 43 deletions src/Tgvs/Telegram/ConfigureWebhook.cs

This file was deleted.

3 changes: 1 addition & 2 deletions src/Tgvs/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
},
"Telegram": {
"Token": "set-in-secrets",
"UseWebhook": false,
"WebhookUrl": "set-in-secrets"
"UseWebhook": false
},
"StickersFile": "stickers.json"
}

0 comments on commit 9179de2

Please sign in to comment.