From 114656b195fa88817583d239e49ad4b2f0d4c3f1 Mon Sep 17 00:00:00 2001 From: atsu1125 Date: Sat, 19 Aug 2023 20:26:37 +0900 Subject: [PATCH 1/2] Fix: Return 0 to AP Request if Hide Followers Count --- app/controllers/follower_accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb index 55f9fb92656949..11214019471768 100644 --- a/app/controllers/follower_accounts_controller.rb +++ b/app/controllers/follower_accounts_controller.rb @@ -60,7 +60,7 @@ def prev_page_url def collection_presenter options = { type: :ordered } - options[:size] = @account.followers_count unless Setting.hide_followers_count || @account.user&.setting_hide_followers_count + options[:size] = (Setting.hide_followers_count || @account.user&.setting_hide_followers_count) ? 0 : @account.followers_count if page_requested? ActivityPub::CollectionPresenter.new( id: account_followers_url(@account, page: params.fetch(:page, 1)), From d197040593575f3538cbd5c9ee33e2ebb3e0ec33 Mon Sep 17 00:00:00 2001 From: atsu1125 Date: Sun, 20 Aug 2023 00:02:04 +0900 Subject: [PATCH 2/2] Fix: Fix: Return 0 to AP Request if Hide Followers Count --- app/controllers/follower_accounts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/follower_accounts_controller.rb b/app/controllers/follower_accounts_controller.rb index 11214019471768..baa022347681e2 100644 --- a/app/controllers/follower_accounts_controller.rb +++ b/app/controllers/follower_accounts_controller.rb @@ -60,7 +60,7 @@ def prev_page_url def collection_presenter options = { type: :ordered } - options[:size] = (Setting.hide_followers_count || @account.user&.setting_hide_followers_count) ? 0 : @account.followers_count + options[:size] = Setting.hide_followers_count || @account.user&.setting_hide_followers_count ? 0 : @account.followers_count if page_requested? ActivityPub::CollectionPresenter.new( id: account_followers_url(@account, page: params.fetch(:page, 1)),