From 6bddd2794c0469bb6c7263f4667c5001fa0789e9 Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Sun, 17 Sep 2023 23:12:58 +0700 Subject: [PATCH] update log --- internal/modules/messenger/telegram/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/modules/messenger/telegram/telegram.go b/internal/modules/messenger/telegram/telegram.go index 6d2f507..81c2bf6 100644 --- a/internal/modules/messenger/telegram/telegram.go +++ b/internal/modules/messenger/telegram/telegram.go @@ -34,7 +34,7 @@ func NewMessengerTelegram(token string) (messenger.IMessenger, error) { func (m *messengerTelegram) GetMessage(ctx context.Context) (*messenger.Message, error) { tgMsg := <-m.updates chatID := int64(0) - if tgMsg.Message.Chat != nil { + if tgMsg.Message != nil && tgMsg.Message.Chat != nil { chatID = tgMsg.Message.Chat.ID } if chatID == 0 {