Add support for mattermost attachments. Shows public link on bridges. Closes #32

This commit is contained in:
Wim 2016-09-20 23:48:58 +02:00
parent fd756c5332
commit 272eef544f
1 changed files with 5 additions and 0 deletions

View File

@ -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
}
}