about summary refs log tree commit diff
path: root/app/controllers/following_accounts_controller.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-05-01 18:24:42 +0200
committerGitHub <noreply@github.com>2022-05-01 18:24:42 +0200
commita41b3d0457451abf750ecd2e5576e4d516d8ab95 (patch)
tree9e2238c87c72ef0bdca8159e4beb886553cd8755 /app/controllers/following_accounts_controller.rb
parent252deefe3433d0cedafd973becd0d85b5182eb49 (diff)
parent26a51291c74e7f27bf5e97bec9cd415d7ed48246 (diff)
Merge pull request #1760 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/following_accounts_controller.rb')
-rw-r--r--app/controllers/following_accounts_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/following_accounts_controller.rb b/app/controllers/following_accounts_controller.rb
index bc291c962..11c6b6d50 100644
--- a/app/controllers/following_accounts_controller.rb
+++ b/app/controllers/following_accounts_controller.rb
@@ -22,7 +22,10 @@ class FollowingAccountsController < ApplicationController
       end
 
       format.json do
-        raise Mastodon::NotPermittedError if page_requested? && @account.hide_collections?
+        if page_requested? && @account.hide_collections?
+          forbidden
+          next
+        end
 
         expires_in(page_requested? ? 0 : 3.minutes, public: public_fetch_mode?)