diff options
Diffstat (limited to 'bridge/telegram')
-rw-r--r-- | bridge/telegram/telegram.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go index 32269241..8631f2f9 100644 --- a/bridge/telegram/telegram.go +++ b/bridge/telegram/telegram.go @@ -98,9 +98,14 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) { message.Text = message.Text + b.Config.EditSuffix } if message.From != nil { - username = message.From.FirstName + if b.Config.UseFirstName { + username = message.From.FirstName + } if username == "" { username = message.From.UserName + if username == "" { + username = message.From.FirstName + } } text = message.Text channel = strconv.FormatInt(message.Chat.ID, 10) |