diff --git a/CHANGELOG.md b/CHANGELOG.md index 362865f7f7..183184eccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### General - ハイライトからのおはnoteの除外でCWを見忘れていたのを修正 - チャンネルをセンシティブ指定できるようになりました +- ハイライトから除外するチャンネルをsensitiveチャンネルのみにしました ### Client diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index 85ac02fed4..ced8635ddb 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -63,16 +63,23 @@ export default class extends Endpoint { 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 \'%おはよう%\'') .andWhere('note.text NOT LIKE \'%:ohayo_nirila_misskey:%\'') - .andWhere('note.cw NOT LIKE \'%おはよう%\'') - .andWhere('note.cw NOT LIKE \'%:ohayo_nirila_misskey:%\'') + .andWhere(new Brackets(qb => { + qb.where('note.cw NOT LIKE \'%おはよう%\'') + .andWhere('note.cw NOT LIKE \'%:ohayo_nirila_misskey:%\'') + .orWhere('note.cw IS NULL'); + })) .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);