5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 17:15:40 +00:00

Bail if any vars are nil, not if all (telegram) (#778)

This commit is contained in:
David Hill 2019-03-27 20:00:57 +00:00 committed by Wim
parent cc05ba8907
commit efd2c99862

View File

@ -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
}