Explorar o código

fix cannot receive dingding alert bug

Yuan Liu %!s(int64=7) %!d(string=hai) anos
pai
achega
68c460a957
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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
 	picUrl := evalContext.ImagePublicUrl
 	title := evalContext.GetNotificationTitle()
+	if message == "" {
+		message = title
+	}
 
 	bodyJSON, err := simplejson.NewJson([]byte(`{
 		"msgtype": "link",