mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Merge commit '150f0fcba5585782e2cac49d971904f02d5e6fbd' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/follower_accounts_controller.rb`: Upstream refactored a part of the code where glitch-soc has changed the code to potentially hide followers count. Adapt upstream's changes.
This commit is contained in:
@@ -58,20 +58,22 @@ class FollowerAccountsController < ApplicationController
|
||||
end
|
||||
|
||||
def collection_presenter
|
||||
options = { type: :ordered }
|
||||
options = {}
|
||||
options[:size] = @account.followers_count unless Setting.hide_followers_count || @account.user&.setting_hide_followers_count
|
||||
if page_requested?
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_followers_url(@account, page: params.fetch(:page, 1)),
|
||||
id: page_url(params.fetch(:page, 1)),
|
||||
type: :ordered,
|
||||
items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.account) },
|
||||
part_of: account_followers_url(@account),
|
||||
part_of: ActivityPub::TagManager.instance.followers_uri_for(@account),
|
||||
next: next_page_url,
|
||||
prev: prev_page_url,
|
||||
**options
|
||||
)
|
||||
else
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_followers_url(@account),
|
||||
id: ActivityPub::TagManager.instance.followers_uri_for(@account),
|
||||
type: :ordered,
|
||||
first: page_url(1),
|
||||
**options
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user