Merge pull request #29 from anatawa12/highlight-exclusion-sensitive-only

chore: do not exclude non sensitive channels in featured
This commit is contained in:
anatawa12 2023-08-06 17:13:02 +09:00 committed by GitHub
commit 32966ac65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,7 @@
### General
- ハイライトからのおはnoteの除外でCWを見忘れていたのを修正
- チャンネルをセンシティブ指定できるようになりました
- ハイライトから除外するチャンネルをsensitiveチャンネルのみにしました
### Client

View File

@ -63,7 +63,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (!ps.channelId) {
// featured for welcome page. filter some notes
query.andWhere('note.channelId IS NULL', { channelId: ps.channelId });
query.andWhere(
new Brackets(qb => {
qb.where('note.text NOT LIKE \'%おはよう%\'')
@ -76,6 +75,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
.orWhere('note.fileIds != \'{}\'');
}),
);
query.leftJoinAndSelect('note.channel', 'channel')
.andWhere(new Brackets(qb => {
qb.where('channel.isSensitive IS NULL')
.orWhere('channel.isSensitive = FALSE');
}));
}
if (me) this.queryService.generateMutedUserQuery(query, me);