From ac126320800c0efc78bc393168076a603483a36f Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 18 Aug 2020 00:27:07 -0500 Subject: [Privacy] Add public-only scope to "permitted_for" --- app/models/status.rb | 4 ++-- 1 file 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) -- cgit