Add hide_local_users_for_anonymous setting
This commit is contained in:
parent
bf0d6fd2f5
commit
650cfae270
6 changed files with 13 additions and 2 deletions
|
@ -24,7 +24,7 @@ class PublicFeed
|
|||
scope.merge!(without_replies_scope) unless with_replies?
|
||||
scope.merge!(without_reblogs_scope) unless with_reblogs?
|
||||
scope.merge!(local_only_scope) if local_only?
|
||||
scope.merge!(remote_only_scope) if remote_only?
|
||||
scope.merge!(remote_only_scope) if remote_only? || hide_local_users?
|
||||
scope.merge!(global_timeline_only_scope) if global_timeline?
|
||||
scope.merge!(account_filters_scope) if account?
|
||||
scope.merge!(media_only_scope) if media_only?
|
||||
|
@ -54,6 +54,10 @@ class PublicFeed
|
|||
options[:remote]
|
||||
end
|
||||
|
||||
def hide_local_users?
|
||||
@account.nil? && Setting.hide_local_users_for_anonymous
|
||||
end
|
||||
|
||||
def global_timeline?
|
||||
!options[:remote] && !options[:local]
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue