about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/accounts_controller.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 81b8f8985..651da89ad 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -17,7 +17,7 @@ class AccountsController < ApplicationController
     respond_to do |format|
       format.html do
         use_pack 'public'
-        expires_in 0, public: true unless user_signed_in?
+        expires_in 0, public: true unless user_signed_in? || signed_request_account.present?
 
         @pinned_statuses   = []
         @endorsed_accounts = @account.endorsed_accounts.to_a.sample(4)
@@ -40,7 +40,7 @@ class AccountsController < ApplicationController
       end
 
       format.rss do
-        expires_in 1.minute, public: true
+        expires_in 1.minute, public: !(user_signed_in? || signed_request_account.present?)
 
         limit     = params[:limit].present? ? [params[:limit].to_i, PAGE_SIZE_MAX].min : PAGE_SIZE
         @statuses = filtered_statuses.without_reblogs.limit(limit)
@@ -74,8 +74,7 @@ class AccountsController < ApplicationController
   end
 
   def default_statuses
-    visibility_scopes = user_signed_in? || @account.show_unlisted? ? [:public, :unlisted] : :public
-    @account.statuses.not_local_only.where(visibility: visibility_scopes)
+    @account.statuses.permitted_for(@account, current_account, user_signed_in: user_signed_in?).not_local_only
   end
 
   def only_media_scope