Move SendToEveryone on its own Thread

This commit is contained in:
Marco Realacci 2024-01-21 14:12:10 +01:00
parent 53857456ed
commit 07daa07cf2

View file

@ -107,7 +107,11 @@ namespace SoUnBot.Telegram
chatId: chatId,
text: "Invio annuncio in corso...",
cancellationToken: cancellationToken);
new Thread(() =>
{
Thread.CurrentThread.IsBackground = true;
SendToEveryone(botClient, chatId, update.Message.Text.Substring(6));
}).Start();
return;
}