From cd1fd1bb7c926f5f78334d08ade7e395cac87247 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 29 Apr 2018 15:46:40 +0200 Subject: Fix panic (telegram). Closes #410 --- bridge/telegram/telegram.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge') diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index ee7309ed..93ccb2f4 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -154,11 +154,11 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { // set the ID's from the channel or group message rmsg.ID = strconv.Itoa(message.MessageID) - rmsg.UserID = strconv.Itoa(message.From.ID) rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10) // handle username if message.From != nil { + rmsg.UserID = strconv.Itoa(message.From.ID) if b.GetBool("UseFirstName") { rmsg.Username = message.From.FirstName } -- cgit v1.2.3