|
|
@ -327,7 +327,8 @@ class Status < ApplicationRecord
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def as_public_timeline(account = nil, local_only = false)
|
|
|
|
def as_public_timeline(account = nil, local_only = false)
|
|
|
|
query = timeline_scope(local_only).without_replies
|
|
|
|
query = timeline_scope(local_only)
|
|
|
|
|
|
|
|
query = query.without_replies unless Setting.show_replies_in_public_timelines
|
|
|
|
|
|
|
|
|
|
|
|
apply_timeline_filters(query, account, local_only)
|
|
|
|
apply_timeline_filters(query, account, local_only)
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -408,9 +409,12 @@ class Status < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
|
|
def timeline_scope(local_only = false)
|
|
|
|
def timeline_scope(local_only = false)
|
|
|
|
starting_scope = local_only ? Status.local : Status
|
|
|
|
starting_scope = local_only ? Status.local : Status
|
|
|
|
|
|
|
|
starting_scope = starting_scope.with_public_visibility
|
|
|
|
|
|
|
|
if Setting.show_reblogs_in_public_timelines
|
|
|
|
starting_scope
|
|
|
|
starting_scope
|
|
|
|
.with_public_visibility
|
|
|
|
else
|
|
|
|
.without_reblogs
|
|
|
|
starting_scope.without_reblogs
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def apply_timeline_filters(query, account, local_only)
|
|
|
|
def apply_timeline_filters(query, account, local_only)
|
|
|
|