Skip to content

Commit

Permalink
fix: アンテナで正しくindexableがfalseなユーザーを検索から除外できるように (#168)
Browse files Browse the repository at this point in the history
Co-authored-by: Esurio <[email protected]>
  • Loading branch information
1673beta and Esurio authored Sep 8, 2024
1 parent e9fa7e5 commit 399fa32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_engawa.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

### Server
- fix: `ApPersonService``isIndexable`を考慮してなかった箇所がある問題
- fix: `toot:indexable`がfalseなユーザーを検索できてしまっていた問題
- fix: `toot:indexable`がfalseなユーザーがアンテナに載っていた問題

### Misc

Expand Down
5 changes: 2 additions & 3 deletions packages/backend/src/server/api/endpoints/antennas/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-

const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds })
.innerJoinAndSelect('note.user', 'user')
.innerJoinAndSelect('note.user', 'user', 'user.isIndexable = true')
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser')
.andWhere('user.isIndexable = true');
.leftJoinAndSelect('renote.user', 'renoteUser');

this.queryService.generateVisibilityQuery(query, me);
this.queryService.generateMutedUserQuery(query, me);
Expand Down

0 comments on commit 399fa32

Please sign in to comment.