mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-12-24 18:25:40 +00:00
Lookup bot username (slack). #213
This commit is contained in:
parent
e8acc49cbd
commit
8411f2aa32
@ -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++
|
||||
|
Loading…
Reference in New Issue
Block a user