mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-28 21:52:08 -08: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