summaryrefslogtreecommitdiffstats
path: root/bridge/telegram/handlers.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2019-04-05 00:02:26 +0200
committerWim <wim@42.be>2019-04-05 00:02:26 +0200
commit8cc2d3b4fe6104429642b1b63d363164ed5745de (patch)
treef28e4d309f8a378dc5ca73bae929e083924dfa3f /bridge/telegram/handlers.go
parentaba9e4f3be87b7c552b4eb6bf884a03c1ce5afc0 (diff)
downloadmatterbridge-msglm-8cc2d3b4fe6104429642b1b63d363164ed5745de.tar.gz
matterbridge-msglm-8cc2d3b4fe6104429642b1b63d363164ed5745de.tar.bz2
matterbridge-msglm-8cc2d3b4fe6104429642b1b63d363164ed5745de.zip
Revert "Bail if any vars are nil, not if all (telegram) (#778)"
This reverts commit efd2c9986270a8a1dd35f896a80d6465fc52054b.
Diffstat (limited to 'bridge/telegram/handlers.go')
-rw-r--r--bridge/telegram/handlers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bridge/telegram/handlers.go b/bridge/telegram/handlers.go
index cbb1068e..fa8f2ffb 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
}