chore: do not exclude non sensitive channels in featured

This commit is contained in:
anatawa12 2023-08-06 16:46:35 +09:00
parent 9a688dde0a
commit 8a19c96f32
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
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 \'%おはよう%\'')
@ -73,6 +72,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);