Skip to content

Commit

Permalink
Merge pull request #315 from caztg/dev
Browse files Browse the repository at this point in the history
issues#314 fix DingNotifier
  • Loading branch information
yanhom1314 authored Jul 14, 2023
2 parents dbacde9 + e73cdb5 commit 3060b91
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
@Slf4j
public class DingNotifier extends AbstractHttpNotifier {

private final static String ALL = "all";

@Override
public String platform() {
return NotifyPlatformEnum.DING.name().toLowerCase();
Expand All @@ -58,7 +60,7 @@ protected String buildMsgBody(NotifyPlatform platform, String content) {

List<String> mobiles = Lists.newArrayList(getNotifyReceivers(platform));
at.setAtMobiles(mobiles);
if (CollectionUtils.isEmpty(mobiles)) {
if (mobiles.contains(ALL) || CollectionUtils.isEmpty(mobiles)) {
at.setAtAll(true);
}

Expand All @@ -76,7 +78,8 @@ protected String buildUrl(NotifyPlatform platform) {

/**
* Build target url.
* @param secret secret
*
* @param secret secret
* @param accessToken accessToken
* @return url
*/
Expand Down

0 comments on commit 3060b91

Please sign in to comment.