From 689f5cb686c6d74fe1ddf9d8fe8caf9286aebe73 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Tue, 7 Feb 2017 11:10:05 +0100 Subject: [PATCH] feat(alerting): Text formatting for Threema alert messages --- pkg/services/alerting/notifiers/threema.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/services/alerting/notifiers/threema.go b/pkg/services/alerting/notifiers/threema.go index f805bd24394..a710d686d28 100644 --- a/pkg/services/alerting/notifiers/threema.go +++ b/pkg/services/alerting/notifiers/threema.go @@ -127,14 +127,14 @@ func (notifier *ThreemaNotifier) Notify(evalContext *alerting.EvalContext) error data.Set("secret", notifier.APISecret) // Build message - message := fmt.Sprintf("%s\nState: %s\nMessage: %s\n", + message := fmt.Sprintf("%s\n\n*State:* %s\n*Message:* %s\n", evalContext.GetNotificationTitle(), evalContext.Rule.Name, evalContext.Rule.Message) ruleURL, err := evalContext.GetRuleUrl() if err == nil { - message = message + fmt.Sprintf("URL: %s\n", ruleURL) + message = message + fmt.Sprintf("*URL:* %s\n", ruleURL) } if evalContext.ImagePublicUrl != "" { - message = message + fmt.Sprintf("Image: %s\n", evalContext.ImagePublicUrl) + message = message + fmt.Sprintf("*Image:* %s\n", evalContext.ImagePublicUrl) } data.Set("text", message)