about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-18 00:27:07 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:19 -0500
commitac126320800c0efc78bc393168076a603483a36f (patch)
treeff32d73a3dc9ab4fc87cf682079d46358f4e38fb
parentdbc0b8cac26f207be6a418016435803e7f81943a (diff)
[Privacy] Add public-only scope to "permitted_for"
-rw-r--r--app/models/status.rb4
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)