summaryrefslogtreecommitdiffstats
path: root/bridge/slack
diff options
context:
space:
mode:
authorMaxim <mvaleev@users.noreply.github.com>2018-06-13 22:58:51 +0300
committerWim <wim@42.be>2018-06-13 21:58:51 +0200
commit594492fbddd930c04184a848fbb73866274fbae6 (patch)
treeae4b42116608dc670fd14da59570d11aa1e0e2f1 /bridge/slack
parentbd9ea7a88dc44f92516315aa1e997a7c1b0e616d (diff)
downloadmatterbridge-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')
-rw-r--r--bridge/slack/slack.go5
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
}