Only consider favorites for community-curated world timeline until we can make the query for considering boosts not be so abysmally slow.

staging
multiple creatures 2019-04-14 01:06:10 -05:00
parent 16147d73a2
commit 6c7f1691ee
1 changed files with 8 additions and 7 deletions

View File

@ -386,15 +386,16 @@ class Status < ApplicationRecord
.where(account_id: Account.local)
.reorder(:status_id)
.distinct
# We need to find a new way to do this because it's much too slow.
# grab the stuff we boosted
boost_query = query.reblogs.select(:reblog_of_id)
.reorder(nil)
.distinct
#boost_query = query.reblogs.select(:reblog_of_id)
# .reorder(nil)
# .distinct
# map those ids to actual statuses
# THIS QUERY IS EXPENSIVE AS FUCK!!!!!!!
# but it does the job
query = Status.where(id: boost_query)
.or(where(id: fav_query))
query = Status.where(id: fav_query)
.without_replies
.with_public_visibility
end