diff --git a/server/notification-providers/dingding.js b/server/notification-providers/dingding.js index 79b0605a6..39f8b1711 100644 --- a/server/notification-providers/dingding.js +++ b/server/notification-providers/dingding.js @@ -12,8 +12,8 @@ class DingDing extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { const okMsg = "Sent Successfully."; const mentionAll = notification.mentioning === "everyone"; - const mobileList = notification.mentioning === "specify-mobiles" ? notification.mobileList.split(",") : []; - const userList = notification.mentioning === "specify-users" ? notification.userList.split(",") : []; + const mobileList = notification.mentioning === "specify-mobiles" ? notification.mobileList : []; + const userList = notification.mentioning === "specify-users" ? notification.userList : []; const mentionStr = [ ...mobileList || [], ...userList || [] ].map(item => `@${item}`).join(" "); try { if (heartbeatJSON != null) { diff --git a/src/components/notifications/DingDing.vue b/src/components/notifications/DingDing.vue index f6012818b..d5227bb39 100644 --- a/src/components/notifications/DingDing.vue +++ b/src/components/notifications/DingDing.vue @@ -25,23 +25,109 @@
- +
- +
diff --git a/src/lang/en.json b/src/lang/en.json index 641dae02e..3a80e37c7 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -688,9 +688,13 @@ "Don't mention people": "Don't mention people", "Mention group": "Mention {group}", "Mention Mobile List": "Mention mobile list", - "Mention User List": "Mention user ID List", - "Dingtalk Mobile List": "Mobile List (use comma separator)", - "Dingtalk User List": "User List (use comma separator)", + "Mention User List": "Mention user id list", + "Dingtalk Mobile List": "Mobile list", + "Dingtalk User List": "User ID list", + "Enter a list of userId": "Enter a list of userId", + "Enter a list of mobile": "Enter a list of mobile", + "Invalid mobile": "Invalid mobile [{mobile}]", + "Invalid userId": "Invalid userId [{userId}]", "Device Token": "Device Token", "Platform": "Platform", "Huawei": "Huawei",