0
0
Fork 0

Change ActivityPub path generation to all happen in ActivityPub::TagManager (#33527)

This commit is contained in:
Claire 2025-01-13 10:39:05 +01:00 committed by GitHub
parent 53885b0fdb
commit d517fa5ab7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 82 additions and 27 deletions

View file

@ -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

View file

@ -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

View file

@ -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