Skip to content
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

enhance: GTL以外ではセンシティブなユーザーを表示しないように #135

Merged
merged 3 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG_engawa.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

### General
- リバーシは削除されました
- センシティブなユーザーをHTL/LTL/STL上で表示しないようになりました
- 管理者側でユーザーがセンシティブかどうか設定できるようになりました
- それに伴い、ユーザー側で設定できなくなりました

### Client
- 検索ウィジェットにオートフォーカスが当たらなくなりました
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/core/FanoutTimelineEndpointService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export class FanoutTimelineEndpointService {
if (isUserRelated(note, userIdsWhoMeMuting, ps.ignoreAuthorFromMute)) return false;
if (!ps.ignoreAuthorFromMute && isRenote(note) && !isQuote(note) && userIdsWhoMeMutingRenotes.has(note.userId)) return false;
if (isInstanceMuted(note, userMutedInstances)) return false;
if (!note.user || note.user.isSensitive) return false;

return parentFilter(note);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser');
.leftJoinAndSelect('renote.user', 'renoteUser')
.andWhere('(SELECT "isSensitive" FROM "user" WHERE id = note."userId") = FALSE');

if (followingChannels.length > 0) {
const followingChannelIds = followingChannels.map(x => x.followeeId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser');
.leftJoinAndSelect('renote.user', 'renoteUser')
.andWhere('(SELECT "isSensitive" FROM "user" WHERE id = note."userId") = FALSE');

this.queryService.generateVisibilityQuery(query, me);
if (me) this.queryService.generateMutedUserQuery(query, me);
Expand Down
3 changes: 2 additions & 1 deletion packages/backend/src/server/api/endpoints/notes/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser');
.leftJoinAndSelect('renote.user', 'renoteUser')
.andWhere('user.isSensitive = FALSE');

if (followees.length > 0 && followingChannels.length > 0) {
// ユーザー・チャンネルともにフォローあり
Expand Down
6 changes: 3 additions & 3 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
"typescript": "5.5.4",
"uuid": "10.0.0",
"v-code-diff": "1.12.0",
"vite": "5.3.5",
"vue": "3.4.34",
"vite": "5.4.0",
"vue": "3.4.37",
"vue-prism-editor": "2.0.0-alpha.2",
"vuedraggable": "next"
},
Expand Down Expand Up @@ -124,7 +124,7 @@
"@typescript-eslint/eslint-plugin": "7.17.0",
"@typescript-eslint/parser": "7.17.0",
"@vitest/coverage-v8": "1.6.0",
"@vue/runtime-core": "3.4.34",
"@vue/runtime-core": "3.4.37",
"acorn": "8.12.1",
"cross-env": "7.0.3",
"cypress": "13.13.1",
Expand Down
Loading
Loading