diff options
author | Wim <wim@42.be> | 2016-09-20 23:48:58 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2016-09-20 23:48:58 +0200 |
commit | 272eef544f7c4c6951b3dc6539120168dcd0996d (patch) | |
tree | 1f0b63b12a5144fe0f8510b088c23a4989110281 /bridge/mattermost | |
parent | fd756c53324f91817f0fd040fa00114c35b4ad72 (diff) | |
download | matterbridge-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.go | 5 |
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 } } |