diff options
author | Maxim <mvaleev@users.noreply.github.com> | 2018-06-13 22:58:51 +0300 |
---|---|---|
committer | Wim <wim@42.be> | 2018-06-13 21:58:51 +0200 |
commit | 594492fbddd930c04184a848fbb73866274fbae6 (patch) | |
tree | ae4b42116608dc670fd14da59570d11aa1e0e2f1 /bridge/slack/slack.go | |
parent | bd9ea7a88dc44f92516315aa1e997a7c1b0e616d (diff) | |
download | matterbridge-msglm-594492fbddd930c04184a848fbb73866274fbae6.tar.gz matterbridge-msglm-594492fbddd930c04184a848fbb73866274fbae6.tar.bz2 matterbridge-msglm-594492fbddd930c04184a848fbb73866274fbae6.zip |
Add Title from attachment slack message (#446)
Diffstat (limited to 'bridge/slack/slack.go')
-rw-r--r-- | bridge/slack/slack.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go index 1fcfa32a..417a4330 100644 --- a/bridge/slack/slack.go +++ b/bridge/slack/slack.go @@ -503,7 +503,10 @@ func (b *Bslack) handleMessageEvent(ev *slack.MessageEvent) (*config.Message, er if rmsg.Text == "" { for _, attach := range ev.Attachments { if attach.Text != "" { - rmsg.Text = attach.Text + if attach.Title != "" { + rmsg.Text = attach.Title + "\n" + } + rmsg.Text += attach.Text } else { rmsg.Text = attach.Fallback } |