5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 16:20:26 +00:00

Fix panic on nil messages (telegram). Closes #366

This commit is contained in:
Wim 2018-02-07 14:28:48 +01:00
parent 2b15739b48
commit df5bce27b0

View File

@ -134,6 +134,10 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
for update := range updates {
flog.Debugf("Receiving from telegram: %#v", update.Message)
if update.Message == nil {
flog.Error("Getting nil messages, this shouldn't happen.")
continue
}
var message *tgbotapi.Message
username := ""
channel := ""