zhuangchong commented on a change in pull request #7805:
URL: https://github.com/apache/dolphinscheduler/pull/7805#discussion_r782748498
##########
File path:
dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java
##########
@@ -145,8 +159,18 @@ public AlertResult sendDingTalkMsg(String title, String
content) {
private String sendMsg(String title, String content) throws IOException {
- String msgToJson = textToJsonString(title + content + "#" + keyword);
- HttpPost httpPost = constructHttpPost(url, msgToJson);
+ StringBuilder text = new StringBuilder();
+ if
(org.apache.dolphinscheduler.spi.utils.StringUtils.isNotBlank(keyword)) {
+ text.append(keyword);
+ text.append(":");
+ }
+ text.append(title);
+ text.append("\n");
+ text.append(content);
+
+ String msgToJson = textToJsonString(text.toString());
Review comment:
No effect, the keyword is configured by DingTalk robot, as long as the
text message contains it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]