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
guqing 2022-09-30 10:22:19 +08:00 committed by GitHub
parent 79bd55424d
commit a3aba94102
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public class CommentServiceImpl implements CommentService {
} }
comment.getSpec() comment.getSpec()
.setApproved(Boolean.FALSE.equals(commentSetting.getRequireReviewForNew())); .setApproved(Boolean.FALSE.equals(commentSetting.getRequireReviewForNew()));
comment.getSpec().setHidden(!comment.getSpec().getApproved()); comment.getSpec().setHidden(false);
if (comment.getSpec().getOwner() != null) { if (comment.getSpec().getOwner() != null) {
return Mono.just(comment); return Mono.just(comment);
} }

View File

@ -141,7 +141,7 @@ class CommentServiceImplTest {
"top": false, "top": false,
"allowNotification": true, "allowNotification": true,
"approved": false, "approved": false,
"hidden": true, "hidden": false,
"subjectRef": { "subjectRef": {
"group": "content.halo.run", "group": "content.halo.run",
"version": "v1alpha1", "version": "v1alpha1",