fix: outlawed comments should appear at the bottom (#2246)
This commit is contained in:
		
							parent
							
								
									1eea0a3ae0
								
							
						
					
					
						commit
						7b3625eeeb
					
				@ -34,6 +34,8 @@ function commentsOrderByClause (me, models, sort) {
 | 
			
		||||
  const sharedSortsArray = []
 | 
			
		||||
  sharedSortsArray.push('("Item"."pinId" IS NOT NULL) DESC')
 | 
			
		||||
  sharedSortsArray.push('("Item"."deletedAt" IS NULL) DESC')
 | 
			
		||||
  // outlawed items should be at the bottom
 | 
			
		||||
  sharedSortsArray.push(`NOT ("Item"."weightedVotes" - "Item"."weightedDownVotes" <= -${ITEM_FILTER_THRESHOLD} OR "Item".outlawed) DESC`)
 | 
			
		||||
  const sharedSorts = sharedSortsArray.join(', ')
 | 
			
		||||
 | 
			
		||||
  if (sort === 'recent') {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user