Change ActivityPub path generation to all happen in ActivityPub::TagManager
(#33527)
This commit is contained in:
parent
53885b0fdb
commit
d517fa5ab7
9 changed files with 82 additions and 27 deletions
|
@ -49,7 +49,7 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController
|
|||
|
||||
def collection_presenter
|
||||
ActivityPub::CollectionPresenter.new(
|
||||
id: account_collection_url(@account, params[:id]),
|
||||
id: ActivityPub::TagManager.instance.collection_uri_for(@account, params[:id]),
|
||||
type: @type,
|
||||
size: @size,
|
||||
items: @items
|
||||
|
|
|
@ -41,12 +41,8 @@ class ActivityPub::OutboxesController < ActivityPub::BaseController
|
|||
end
|
||||
end
|
||||
|
||||
def outbox_url(**)
|
||||
if params[:account_username].present?
|
||||
account_outbox_url(@account, **)
|
||||
else
|
||||
instance_actor_outbox_url(**)
|
||||
end
|
||||
def outbox_url(...)
|
||||
ActivityPub::TagManager.instance.outbox_uri_for(@account, ...)
|
||||
end
|
||||
|
||||
def next_page
|
||||
|
|
|
@ -46,7 +46,7 @@ class FollowerAccountsController < ApplicationController
|
|||
end
|
||||
|
||||
def page_url(page)
|
||||
account_followers_url(@account, page: page) unless page.nil?
|
||||
ActivityPub::TagManager.instance.followers_uri_for(@account, page: page) unless page.nil?
|
||||
end
|
||||
|
||||
def next_page_url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue