Fix explore page correctly.

This commit is contained in:
Fosco Marotto 2021-02-03 11:55:57 -05:00
parent 4e0605165d
commit 584482f325
1 changed files with 5 additions and 0 deletions

View File

@ -114,6 +114,11 @@ class SortingQueryBuilder < BaseService
query = query.joins(:status) query = query.joins(:status)
query = query.where('statuses.reblog_of_id IS NULL') query = query.where('statuses.reblog_of_id IS NULL')
query = query.where('statuses.in_reply_to_id IS NULL') query = query.where('statuses.in_reply_to_id IS NULL')
query = query.joins(<<-SQL).
join accounts
on statuses.account_id = accounts.id
SQL
where('accounts.is_flagged_as_spam is false')
if source == "explore" if source == "explore"
query = query.where('statuses.group_id': nil) query = query.where('statuses.group_id': nil)
else else