Telegram: don't panic on empty message

This commit is contained in:
andig 2024-08-05 15:10:47 +02:00
parent 544e130c27
commit 314acde61f

View file

@ -65,6 +65,9 @@ func (m *Telegram) trackChats() {
conf.Timeout = 1000
for update := range m.bot.GetUpdatesChan(conf) {
if update.Message == nil || update.Message.Chat == nil {
continue
}
m.Lock()
if _, ok := m.chats[update.Message.Chat.ID]; !ok {
m.log.INFO.Printf("new chat id: %d", update.Message.Chat.ID)