Browse Source

fix cannot receive dingding alert bug

Yuan Liu 7 years ago
parent
commit
68c460a957
1 changed files with 3 additions and 0 deletions
  1. 3 0
      pkg/services/alerting/notifiers/dingding.go

+ 3 - 0
pkg/services/alerting/notifiers/dingding.go

@@ -57,6 +57,9 @@ func (this *DingDingNotifier) Notify(evalContext *alerting.EvalContext) error {
 	message := evalContext.Rule.Message
 	message := evalContext.Rule.Message
 	picUrl := evalContext.ImagePublicUrl
 	picUrl := evalContext.ImagePublicUrl
 	title := evalContext.GetNotificationTitle()
 	title := evalContext.GetNotificationTitle()
+	if message == "" {
+		message = title
+	}
 
 
 	bodyJSON, err := simplejson.NewJson([]byte(`{
 	bodyJSON, err := simplejson.NewJson([]byte(`{
 		"msgtype": "link",
 		"msgtype": "link",