From 272eef544f7c4c6951b3dc6539120168dcd0996d Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 20 Sep 2016 23:48:58 +0200 Subject: Add support for mattermost attachments. Shows public link on bridges. Closes #32 --- bridge/mattermost/mattermost.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bridge/mattermost/mattermost.go') 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 } } -- cgit v1.2.3