Merge remote-tracking branch 'niri-la/develop' into notification-tl-limit

This commit is contained in:
anatawa12 2023-08-06 17:14:11 +09:00
commit e463974ce7
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
2 changed files with 11 additions and 3 deletions

View File

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

View File

@ -63,16 +63,23 @@ 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 \'%おはよう%\'')
.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);