summaryrefslogtreecommitdiffstats
path: root/bridge/mattermost
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-09-20 23:48:58 +0200
committerWim <wim@42.be>2016-09-20 23:48:58 +0200
commit272eef544f7c4c6951b3dc6539120168dcd0996d (patch)
tree1f0b63b12a5144fe0f8510b088c23a4989110281 /bridge/mattermost
parentfd756c53324f91817f0fd040fa00114c35b4ad72 (diff)
downloadmatterbridge-msglm-272eef544f7c4c6951b3dc6539120168dcd0996d.tar.gz
matterbridge-msglm-272eef544f7c4c6951b3dc6539120168dcd0996d.tar.bz2
matterbridge-msglm-272eef544f7c4c6951b3dc6539120168dcd0996d.zip
Add support for mattermost attachments. Shows public link on bridges. Closes #32
Diffstat (limited to 'bridge/mattermost')
-rw-r--r--bridge/mattermost/mattermost.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/bridge/mattermost/mattermost.go b/bridge/mattermost/mattermost.go
index a79a311b..2f4b4133 100644
--- a/bridge/mattermost/mattermost.go
+++ b/bridge/mattermost/mattermost.go
@@ -163,6 +163,11 @@ func (b *Bmattermost) handleMatterClient(mchan chan *MMMessage) {
m.Username = message.Username
m.Channel = message.Channel
m.Text = message.Text
+ if len(message.Post.Filenames) > 0 {
+ for _, link := range b.mc.GetPublicLinks(message.Post.Filenames) {
+ m.Text = m.Text + "\n" + link
+ }
+ }
mchan <- m
}
}