-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: searchableByの対応 #519
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #519 +/- ##
============================================
- Coverage 60.02% 40.45% -19.57%
============================================
Files 882 1676 +794
Lines 102419 227331 +124912
Branches 2697 2730 +33
============================================
+ Hits 61472 91967 +30495
- Misses 40890 134753 +93863
- Partials 57 611 +554 ☔ View full report in Codecov by Sentry. |
이 PR에 의한 api.json 차이 차이점은 여기에서 볼 수 있음--- base
+++ head
@@ -50055,6 +50055,15 @@
"isIndexable": {
"type": "boolean"
},
+ "searchableBy": {
+ "type": "string",
+ "enum": [
+ "public",
+ "followersAndReacted",
+ "reactedOnly",
+ "private"
+ ]
+ },
"hideOnlineStatus": {
"type": "boolean"
},
@@ -57297,6 +57306,19 @@
],
"default": null
},
+ "searchableBy": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "enum": [
+ "public",
+ "followersAndReacted",
+ "reactedOnly",
+ "private"
+ ],
+ "default": "public"
+ },
"disableRightClick": {
"type": "boolean",
"default": false
@@ -57798,6 +57820,19 @@
],
"default": null
},
+ "searchableBy": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "enum": [
+ "public",
+ "followersAndReacted",
+ "reactedOnly",
+ "private"
+ ],
+ "default": "public"
+ },
"disableRightClick": {
"type": "boolean",
"default": false |
ba4870a
to
b1f33ea
Compare
🏳 |
デフォ値がpublicだからindexableは落ちるに決まってましたわ |
@@ -954,6 +986,9 @@ export class AdvancedSearchService { | |||
minimum_should_match: 1, | |||
}, | |||
}); | |||
osFilter.bool.must_not.push({ term: { searchableBy: 'followersAndReacted' } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publicを許可にした方が良さそう
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publicを許可にすると対応前に作成された投稿すべてが出てこなくなるのはどうなのという気持ち
@@ -188,22 +188,26 @@ export class QueryService { | |||
} | |||
|
|||
@bindThis | |||
public generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: MiUser['id'] } | null, followingFilter?: string): void { | |||
public generateVisibilityQuery(q: SelectQueryBuilder<any>, me?: { id: MiUser['id'] } | null, search?: boolean, followingFilter?: string): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この位置にオプション追加すると意図しない影響出そう
packages/backend/src/core/activitypub/models/ApOutboxFetchService.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/activitypub/models/ApPersonService.ts
Outdated
Show resolved
Hide resolved
packages/backend/src/core/activitypub/models/ApPersonService.ts
Outdated
Show resolved
Hide resolved
}); | ||
|
||
//色々出てくる | ||
test('searchableBy(user: null, indexable false)', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一応publicでリアクションするケースもカバーしときたい
0b98a1d
to
3df00ab
Compare
55e9647
to
1ac015d
Compare
What
searchableByの対応
Why
Resolve #440
Additional info (optional)
searchable_by_nobodyにも対応
Checklist