mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 20:40:27 +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.Text = ev.Text
|
||||||
m.Raw = ev
|
m.Raw = ev
|
||||||
m.Text = b.replaceMention(m.Text)
|
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
|
mchan <- m
|
||||||
}
|
}
|
||||||
count++
|
count++
|
||||||
|
Loading…
Reference in New Issue
Block a user