summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2018-04-29 15:46:40 +0200
committerWim <wim@42.be>2018-04-29 15:46:40 +0200
commitcd1fd1bb7c926f5f78334d08ade7e395cac87247 (patch)
tree5e65240240e5b1fd844639e215f88ba0f8ce7591
parentd44df7b6e66e6ba9b73c615401ddb83d8f827c50 (diff)
downloadmatterbridge-msglm-cd1fd1bb7c926f5f78334d08ade7e395cac87247.tar.gz
matterbridge-msglm-cd1fd1bb7c926f5f78334d08ade7e395cac87247.tar.bz2
matterbridge-msglm-cd1fd1bb7c926f5f78334d08ade7e395cac87247.zip
Fix panic (telegram). Closes #410
-rw-r--r--bridge/telegram/telegram.go2
1 files changed, 1 insertions, 1 deletions
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
}