From 260751ab8e749e9195985241d07faa21e603a577 Mon Sep 17 00:00:00 2001 From: mon Date: Thu, 4 Jan 2024 13:36:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=8E=A8=E9=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/xiqi/notifyme/strategy/CommentStrategy.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); + } } });