From 9e0445fbd697386982e4ff0f19e7200c06b33137 Mon Sep 17 00:00:00 2001
From: Fire Demon <firedemon@creature.cafe>
Date: Mon, 13 Jul 2020 12:53:20 -0500
Subject: [Privacy] Allow unlisted posts on public pages when viewer is
 authenticated

---
 app/controllers/accounts_controller.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'app/controllers')

diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index e1c230e7a..b485eedc9 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -74,7 +74,8 @@ class AccountsController < ApplicationController
   end
 
   def default_statuses
-    @account.statuses.not_local_only.where(visibility: :public)
+    visibility_scopes = user_signed_in? ? [:public, :unlisted] : :public
+    @account.statuses.not_local_only.where(visibility: visibility_scopes)
   end
 
   def only_media_scope
-- 
cgit