mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 15:58:50 +00:00
Add support for numeric-based URIs for local accounts (#32724)
This commit is contained in:
@@ -49,7 +49,7 @@ class FollowingAccountsController < ApplicationController
|
||||
end
|
||||
|
||||
def page_url(page)
|
||||
account_following_index_url(@account, page: page) unless page.nil?
|
||||
ActivityPub::TagManager.instance.following_uri_for(@account, page: page) unless page.nil?
|
||||
end
|
||||
|
||||
def next_page_url
|
||||
@@ -63,17 +63,17 @@ class FollowingAccountsController < ApplicationController
|
||||
def collection_presenter
|
||||
if page_requested?
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_following_index_url(@account, page: params.fetch(:page, 1)),
|
||||
id: page_url(params.fetch(:page, 1)),
|
||||
type: :ordered,
|
||||
size: @account.following_count,
|
||||
items: follows.map { |follow| ActivityPub::TagManager.instance.uri_for(follow.target_account) },
|
||||
part_of: account_following_index_url(@account),
|
||||
part_of: ActivityPub::TagManager.instance.following_uri_for(@account),
|
||||
next: next_page_url,
|
||||
prev: prev_page_url
|
||||
)
|
||||
else
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_following_index_url(@account),
|
||||
id: ActivityPub::TagManager.instance.following_uri_for(@account),
|
||||
type: :ordered,
|
||||
size: @account.following_count,
|
||||
first: page_url(1)
|
||||
|
||||
Reference in New Issue
Block a user