diff options
author | Wim <wim@42.be> | 2019-04-05 00:04:08 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2019-04-05 00:04:08 +0200 |
commit | 01d0a9f412d36562cc3accf6f7c0547c796b34b7 (patch) | |
tree | 1a21612eafaf248bab050e3b0868f773ef020a2c /bridge/telegram | |
parent | 8cc2d3b4fe6104429642b1b63d363164ed5745de (diff) | |
download | matterbridge-msglm-01d0a9f412d36562cc3accf6f7c0547c796b34b7.tar.gz matterbridge-msglm-01d0a9f412d36562cc3accf6f7c0547c796b34b7.tar.bz2 matterbridge-msglm-01d0a9f412d36562cc3accf6f7c0547c796b34b7.zip |
Handle nil message (telegram). Fixes #777
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/handlers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go index fa8f2ffb..98b10207 100644 --- a/bridge/telegram/handlers.go +++ b/bridge/telegram/handlers.go @@ -125,6 +125,11 @@ 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) |