mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 16:20:26 +00:00
Handle nil message (telegram). Fixes #777
This commit is contained in:
parent
8cc2d3b4fe
commit
01d0a9f412
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user