mirror of https://github.com/halo-dev/halo
refactor: comment hidden default is false (#2482)
#### What type of PR is this? /kind improvement /area core /milestone 2.0 #### What this PR does / why we need it: 创建评论时 hidden 字段默认为 false #### Which issue(s) this PR fixes: Fixes # #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note None ```pull/2495/head
parent
79bd55424d
commit
a3aba94102
|
@ -81,7 +81,7 @@ public class CommentServiceImpl implements CommentService {
|
|||
}
|
||||
comment.getSpec()
|
||||
.setApproved(Boolean.FALSE.equals(commentSetting.getRequireReviewForNew()));
|
||||
comment.getSpec().setHidden(!comment.getSpec().getApproved());
|
||||
comment.getSpec().setHidden(false);
|
||||
if (comment.getSpec().getOwner() != null) {
|
||||
return Mono.just(comment);
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ class CommentServiceImplTest {
|
|||
"top": false,
|
||||
"allowNotification": true,
|
||||
"approved": false,
|
||||
"hidden": true,
|
||||
"hidden": false,
|
||||
"subjectRef": {
|
||||
"group": "content.halo.run",
|
||||
"version": "v1alpha1",
|
||||
|
|
Loading…
Reference in New Issue