5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-10 04:20:25 +00:00

Add support for fallback/text in attachments (slack)

This commit is contained in:
Wim 2017-07-16 18:08:26 +02:00
parent 835a1ac3a6
commit 778abea2d9

View File

@ -262,6 +262,15 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
}
m.Channel = channel.Name
m.Text = ev.Text
if m.Text == "" {
for _, attach := range ev.Attachments {
if attach.Text != "" {
m.Text = attach.Text
} else {
m.Text = attach.Fallback
}
}
}
m.Raw = ev
m.Text = b.replaceMention(m.Text)
if ev.BotID != "" {