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 {