Telegram: don't panic on empty message
This commit is contained in:
parent
544e130c27
commit
314acde61f
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue