From bf1d7df88f26d80d30cf74897cb9175ac3199ba2 Mon Sep 17 00:00:00 2001 From: Akulij Date: Sat, 29 Mar 2025 19:34:18 +0800 Subject: [PATCH] asynchronously send event notification --- cmd/app/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/app/main.go b/cmd/app/main.go index 416f486..35b1570 100644 --- a/cmd/app/main.go +++ b/cmd/app/main.go @@ -88,8 +88,10 @@ func notifyAboutEvents(bc BotController) { for _, reservation := range reservations { uid := reservation.UserID - msg := tgbotapi.NewMessage(uid, bc.GetBotContent("notify_pre_event")) - bc.bot.Send(msg) + go func() { + msg := tgbotapi.NewMessage(uid, bc.GetBotContent("notify_pre_event")) + bc.bot.Send(msg) + }() } } }