Merge pull request #244 from dmclain/slack_text_fix

Slack: Use the text template processor for the text field
This commit is contained in:
Brian Brazil 2016-02-08 22:10:58 +00:00
commit c676102c45
1 changed files with 1 additions and 2 deletions

View File

@ -481,14 +481,13 @@ func (n *Slack) Notify(ctx context.Context, as ...*types.Alert) error {
var (
data = n.tmpl.Data(receiver(ctx), groupLabels(ctx), as...)
tmplText = tmplText(n.tmpl, data, &err)
tmplHTML = tmplHTML(n.tmpl, data, &err)
)
attachment := &slackAttachment{
Title: tmplText(n.conf.Title),
TitleLink: tmplText(n.conf.TitleLink),
Pretext: tmplText(n.conf.Pretext),
Text: tmplHTML(n.conf.Text),
Text: tmplText(n.conf.Text),
Fallback: tmplText(n.conf.Fallback),
Color: tmplText(n.conf.Color),
MrkdwnIn: []string{"fallback", "pretext", "text"},