diff options
author | David Hill <dhill@mindcry.org> | 2019-03-27 20:00:57 +0000 |
---|---|---|
committer | Wim <wim@42.be> | 2019-03-27 21:00:57 +0100 |
commit | efd2c9986270a8a1dd35f896a80d6465fc52054b (patch) | |
tree | e9c1a30b3b84cf22d7e1595a56b29ed31efe2d9d /bridge | |
parent | cc05ba89073e16dd374f5b5a77cb1214a2e735b9 (diff) | |
download | matterbridge-msglm-efd2c9986270a8a1dd35f896a80d6465fc52054b.tar.gz matterbridge-msglm-efd2c9986270a8a1dd35f896a80d6465fc52054b.tar.bz2 matterbridge-msglm-efd2c9986270a8a1dd35f896a80d6465fc52054b.zip |
Bail if any vars are nil, not if all (telegram) (#778)
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/telegram/handlers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go index fa8f2ffb..cbb1068e 100644 --- a/bridge/telegram/handlers.go +++ b/bridge/telegram/handlers.go @@ -109,8 +109,8 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { for update := range updates { b.Log.Debugf("== Receiving event: %#v", update.Message) - if update.Message == nil && update.ChannelPost == nil && - update.EditedMessage == nil && update.EditedChannelPost == nil { + if update.Message == nil || update.ChannelPost == nil || + update.EditedMessage == nil || update.EditedChannelPost == nil { b.Log.Error("Getting nil messages, this shouldn't happen.") continue } |