Slack: Use the text template processor for the text field to enable linked URLs

Fixes #207
This commit is contained in:
Dave McLain 2016-02-08 21:17:44 +00:00
parent e1530ba985
commit f26bfc30dc
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"},