Merge pull request #244 from dmclain/slack_text_fix
Slack: Use the text template processor for the text field
This commit is contained in:
commit
c676102c45
|
@ -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"},
|
||||
|
|
Loading…
Reference in New Issue