Add Title from attachment slack message (#446)

This commit is contained in:
Maxim 2018-06-13 22:58:51 +03:00 committed by Wim
parent bd9ea7a88d
commit 594492fbdd
1 changed files with 4 additions and 1 deletions

View File

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