about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-07 21:14:32 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-07 21:14:32 -0600
commit109300db1d77b78efcff8144f0d59eeb401a8c31 (patch)
treef751da42347cdc587ef70fad5073998e7d3002d7 /app
parentb0a57027b9ed9ce24b6e553a43f68339ff019d3a (diff)
revert & revise `3631689bd`, fix broken 404 pages
Diffstat (limited to 'app')
-rw-r--r--app/controllers/accounts_controller.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb
index 07d364714..3359eafdf 100644
--- a/app/controllers/accounts_controller.rb
+++ b/app/controllers/accounts_controller.rb
@@ -13,12 +13,13 @@ class AccountsController < ApplicationController
     respond_to do |format|
       format.html do
         use_pack 'public'
-        unless current_account && current_account.id == @account.id
-          raise_not_found if @account.hidden
-          if @account&.user && @account.user.hides_public_profile?
-            raise_not_found unless current_account&.following?(@account)
+
+        unless current_account&.id == @account.id
+          if @account.hidden || @account&.user&.hides_public_profile?
+            return not_found unless current_account&.following?(@account)
           end
         end
+
         expires_in 0, public: true unless user_signed_in?
 
         @pinned_statuses   = []
@@ -43,10 +44,11 @@ class AccountsController < ApplicationController
       format.rss do
         expires_in 1.minute, public: true
 
-        raise_not_found unless current_account&.user&.allows_rss?
+        return not_found unless current_account&.user&.allows_rss?
 
         @statuses = filtered_statuses.without_reblogs.without_replies.limit(PAGE_SIZE)
         @statuses = cache_collection(@statuses, Status)
+
         render xml: RSS::AccountSerializer.render(@account, @statuses, params[:tag])
       end