Skip to content

Commit

Permalink
fix: 修复微信无法推送问题
Browse files Browse the repository at this point in the history
  • Loading branch information
monyuan committed Jan 4, 2024
1 parent 994f34d commit 260751a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/main/java/org/xiqi/notifyme/strategy/CommentStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ public void process(NotifyBaseEvent event, NotifyMe setting) {
String postMetaName = commentSpec.getSubjectRef().getName();
Optional<Post> 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);
}
}
});

Expand Down

0 comments on commit 260751a

Please sign in to comment.