mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	chore: STLのdb fallbackでwithRepliesがtrueのときにすべてのリプライを除外しないように (#12075)
MiFollowingを見るのは実装コストが高いため現状実装していない Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
		
							parent
							
								
									9afcdd10ed
								
							
						
					
					
						commit
						991fa054a6
					
				
					 1 changed files with 11 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue