Skip to content
Snippets Groups Projects
Unverified Commit 991fa054 authored by anatawa12's avatar anatawa12 Committed by GitHub
Browse files

chore: STLのdb fallbackでwithRepliesがtrueのときにすべてのリプライを除外しないように (#12075)


MiFollowingを見るのは実装コストが高いため現状実装していない

Co-authored-by: default avatarsyuilo <Syuilotan@yahoo.co.jp>
parent 9afcdd10
No related branches found
No related tags found
No related merge requests found
......@@ -182,15 +182,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('reply.user', 'replyUser')
.leftJoinAndSelect('renote.user', 'renoteUser');
query.andWhere(new Brackets(qb => {
qb
.where('note.replyId IS NULL') // 返信ではない
.orWhere(new Brackets(qb => {
qb // 返信だけど投稿者自身への返信
.where('note.replyId IS NOT NULL')
.andWhere('note.replyUserId = note.userId');
}));
}));
if (!ps.withReplies) {
query.andWhere(new Brackets(qb => {
qb
.where('note.replyId IS NULL') // 返信ではない
.orWhere(new Brackets(qb => {
qb // 返信だけど投稿者自身への返信
.where('note.replyId IS NOT NULL')
.andWhere('note.replyUserId = note.userId');
}));
}));
}
this.queryService.generateVisibilityQuery(query, me);
this.queryService.generateMutedUserQuery(query, me);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment