Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

commit 7948ef8bc538d2db3f95576fef608299cc08a61b Author: Wim <wim@42.be> Date: Wed Feb 07 14:28:48 2018 +0000 Fix panic on nil messages (telegram). Closes #366 diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 0962280..dfb596a 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -1346 +13410 @@ 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 := ""