Limit scope of local/world TLs. Fixes the bug causing some requests to fetch the local and world timelines to time out.

staging
multiple creatures 2019-04-17 10:20:49 -05:00
parent ec5c6e7fcb
commit cea2baf2e0
1 changed files with 2 additions and 4 deletions

View File

@ -377,10 +377,8 @@ class Status < ApplicationRecord
query = timeline_scope(local_only)
query = query.without_replies unless Setting.show_replies_in_public_timelines
else
scope = Status.curated
scope = scope.without_replies unless Setting.show_replies_in_public_timelines
query = scope.public_browsable
.or(scope.where(account: account.following, visibility: :private))
query = Status.curated.public_browsable
query = query.without_replies unless Setting.show_replies_in_public_timelines
end
apply_timeline_filters(query, account, local_only)