diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-18 00:27:07 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:19 -0500 |
commit | ac126320800c0efc78bc393168076a603483a36f (patch) | |
tree | ff32d73a3dc9ab4fc87cf682079d46358f4e38fb | |
parent | dbc0b8cac26f207be6a418016435803e7f81943a (diff) |
[Privacy] Add public-only scope to "permitted_for"
-rw-r--r-- | app/models/status.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 45a5f5c8d..62f8d2778 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -519,10 +519,10 @@ class Status < ApplicationRecord return apply_category_filters(all, target_account, account, **options) if account.id == target_account.id visibility.push(:private) if account.following?(target_account) - elsif !target_account.show_unlisted? - visibility = :public end + visibility = :public if options[:public] || (account.blank? && !target_account.show_unlisted?) + scope = where(visibility: visibility) scope = apply_account_filters(scope, account, **options) apply_category_filters(scope, target_account, account, **options) |