diff --git a/server/notification-providers/dingding.js b/server/notification-providers/dingding.js index 3ad36d547..5d8cb8948 100644 --- a/server/notification-providers/dingding.js +++ b/server/notification-providers/dingding.js @@ -19,6 +19,9 @@ class DingDing extends NotificationProvider { markdown: { title: `[${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]}`, text: `## [${this.statusToString(heartbeatJSON["status"])}] ${monitorJSON["name"]} \n> ${heartbeatJSON["msg"]}\n> Time (${heartbeatJSON["timezone"]}): ${heartbeatJSON["localDateTime"]}`, + }, + "at": { + "isAtAll": notification.mentioning === "everyone" } }; if (await this.sendToDingDing(notification, params)) { diff --git a/src/components/notifications/DingDing.vue b/src/components/notifications/DingDing.vue index 79d8d837d..710677fd7 100644 --- a/src/components/notifications/DingDing.vue +++ b/src/components/notifications/DingDing.vue @@ -2,9 +2,10 @@
- +
+
- +

{{ $t("For safety, must use secret key") }}

@@ -13,4 +14,24 @@
+
+ + +
+ + diff --git a/src/lang/en.json b/src/lang/en.json index 726186f55..696b0ca67 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -667,6 +667,9 @@ "WebHookUrl": "WebHookUrl", "SecretKey": "SecretKey", "For safety, must use secret key": "For safety, must use secret key", + "Mentioning": "Mentioning", + "Don't mention people": "Don't mention people", + "Mention group": "Mention {group}", "Device Token": "Device Token", "Platform": "Platform", "Huawei": "Huawei",