Fix outlawed can show up on front page (#1565)

If an item has a lot of comments, it gets ranked higher.

When an item is now downzapped, it can become outlawed but still show up on the front page because of the comments.

This fixes it by filtering outlawed items out instead of relying on the ranking to make them not show up.
This commit is contained in:
ekzyis 2024-11-13 02:47:14 +01:00 committed by GitHub
parent a44d0daf09
commit 3044c2e98f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -535,6 +535,7 @@ export default {
'"Item".bio = false',
ad ? `"Item".id <> ${ad.id}` : '',
activeOrMine(me),
await filterClause(me, models, type),
subClause(sub, 3, 'Item', me, showNsfw),
muteClause(me))}
ORDER BY rank DESC