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, chatId: chatId,
text: "Invio annuncio in corso...", text: "Invio annuncio in corso...",
cancellationToken: cancellationToken); cancellationToken: cancellationToken);
SendToEveryone(botClient, chatId, update.Message.Text.Substring(6)); new Thread(() =>
{
Thread.CurrentThread.IsBackground = true;
SendToEveryone(botClient, chatId, update.Message.Text.Substring(6));
}).Start();
return; return;
} }