Thumbnail

rani/matterbridge.git

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

commit d8db0732d37ace2a5e17126e0d2f8830df26c59f Author: Wim <wim@42.be> Date: Fri Apr 05 00:04:08 2019 +0000 Handle nil message (telegram). Fixes #777 diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go index fa8f2ff..98b1020 100644 --- a/bridge/telegram/handlers.go +++ b/bridge/telegram/handlers.go @@ -1256 +12511 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {   // handle groups   message = b.handleGroups(&rmsg, message, update)   + if message == nil { + b.Log.Error("message is nil, this shouldn't happen.") + continue + } +   // set the ID's from the channel or group message   rmsg.ID = strconv.Itoa(message.MessageID)   rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10)