diff --git a/src/main/java/org/xiqi/notifyme/strategy/CommentStrategy.java b/src/main/java/org/xiqi/notifyme/strategy/CommentStrategy.java index a3bf9bb..aad0697 100644 --- a/src/main/java/org/xiqi/notifyme/strategy/CommentStrategy.java +++ b/src/main/java/org/xiqi/notifyme/strategy/CommentStrategy.java @@ -26,10 +26,13 @@ public void process(NotifyBaseEvent event, NotifyMe setting) { String postMetaName = commentSpec.getSubjectRef().getName(); Optional postInfo = client.fetch(Post.class, postMetaName); postInfo.ifPresent(post -> { - if (!commentSpec.getApproved()) { //等待审核的 - audits(post, setting, commentSpec); - } else { - publish(post, setting, commentSpec); + if (!commentSpec.getOwner().getName().equals(post.getSpec().getOwner())) { + // 文章作者自己回复的不推送通知 + if (!commentSpec.getApproved()) { //等待审核的 + audits(post, setting, commentSpec); + } else { + publish(post, setting, commentSpec); + } } });