about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/accounts_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 22993934a..94eef62e2 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -11,17 +11,19 @@ class AccountsController < ApplicationController
     respond_to do |format|
       format.html do
         use_pack 'public'
+        not_found if @account.hidden || (@account&.user && @account.user.hides_public_profile?)
         mark_cacheable! unless user_signed_in?
 
         @body_classes      = 'with-modals'
         @pinned_statuses   = []
         @endorsed_accounts = @account.endorsed_accounts.to_a.sample(4)
 
-        if @account.hidden || (@account&.user && @account.user.hides_public_profile?) || (current_account && @account.blocking?(current_account))
+        if current_account && @account.blocking?(current_account)
           @statuses = []
           return
         end
 
+
         @pinned_statuses = cache_collection(@account.pinned_statuses, Status) if show_pinned_statuses?
         @statuses        = filtered_status_page(params)
         @statuses        = cache_collection(@statuses, Status)