mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-10 06:20:28 +00:00
Add support for fallback/text in attachments (slack)
This commit is contained in:
parent
835a1ac3a6
commit
778abea2d9
@ -262,6 +262,15 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
|
|||||||
}
|
}
|
||||||
m.Channel = channel.Name
|
m.Channel = channel.Name
|
||||||
m.Text = ev.Text
|
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.Raw = ev
|
||||||
m.Text = b.replaceMention(m.Text)
|
m.Text = b.replaceMention(m.Text)
|
||||||
if ev.BotID != "" {
|
if ev.BotID != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user