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

Handle nil message (telegram). Fixes #777

This commit is contained in:
Wim 2019-04-05 00:04:08 +02:00
parent 8cc2d3b4fe
commit 01d0a9f412

View File

@ -125,6 +125,11 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
// handle groups // handle groups
message = b.handleGroups(&rmsg, message, update) 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 // set the ID's from the channel or group message
rmsg.ID = strconv.Itoa(message.MessageID) rmsg.ID = strconv.Itoa(message.MessageID)
rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10) rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10)