diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 361af025..c1e324a9 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -229,6 +229,15 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) { m.Text = ev.Text m.Raw = ev m.Text = b.replaceMention(m.Text) + if ev.BotID != "" && user.Name == "" { + bot, err := b.rtm.GetBotInfo(ev.BotID) + if err != nil { + continue + } + if bot.Name != "" { + m.Username = bot.Name + } + } mchan <- m } count++