Fix panic on nil messages (telegram). Closes #366
This commit is contained in:
parent
2b15739b48
commit
df5bce27b0
|
@ -134,6 +134,10 @@ func (b *Btelegram) Send(msg config.Message) (string, error) {
|
||||||
func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
||||||
for update := range updates {
|
for update := range updates {
|
||||||
flog.Debugf("Receiving from telegram: %#v", update.Message)
|
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
|
var message *tgbotapi.Message
|
||||||
username := ""
|
username := ""
|
||||||
channel := ""
|
channel := ""
|
||||||
|
|
Loading…
Reference in New Issue