mirror of
https://github.com/42wim/matterbridge
synced 2024-11-03 15:40:24 +00:00
Fix panic (telegram). Closes #410
This commit is contained in:
parent
d44df7b6e6
commit
cd1fd1bb7c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user