diff options
author | Wim <wim@42.be> | 2018-02-07 14:28:48 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2018-02-07 14:28:48 +0100 |
commit | df5bce27b04e4942ca71a1d1d75c4cb73cdb39de (patch) | |
tree | 5ac8c70314f66936067e85ee09605cd5f2ec595d /bridge/telegram/telegram.go | |
parent | 2b15739b485a80c3cf20f171494b1c377814379d (diff) | |
download | matterbridge-msglm-df5bce27b04e4942ca71a1d1d75c4cb73cdb39de.tar.gz matterbridge-msglm-df5bce27b04e4942ca71a1d1d75c4cb73cdb39de.tar.bz2 matterbridge-msglm-df5bce27b04e4942ca71a1d1d75c4cb73cdb39de.zip |
Fix panic on nil messages (telegram). Closes #366
Diffstat (limited to 'bridge/telegram/telegram.go')
-rw-r--r-- | bridge/telegram/telegram.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 09622801..dfb596aa 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -134,6 +134,10 @@ func (b *Btelegram) Send(msg config.Message) (string, error) { func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { for update := range updates { flog.Debugf("Receiving from telegram: %#v", update.Message) + if update.Message == nil { + flog.Error("Getting nil messages, this shouldn't happen.") + continue + } var message *tgbotapi.Message username := "" channel := "" |