From d8498b39838eb352a9b268e0f22b1b025320dc73 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 28 Feb 2019 18:16:34 +0100 Subject: Give the `replies` collection an identifier and enable pagination (#10128) --- app/lib/activitypub/tag_manager.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app/lib') diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb index be3a562d0..892bb9974 100644 --- a/app/lib/activitypub/tag_manager.rb +++ b/app/lib/activitypub/tag_manager.rb @@ -48,6 +48,12 @@ class ActivityPub::TagManager activity_account_status_url(target.account, target) end + def replies_uri_for(target, page_params = nil) + raise ArgumentError, 'target must be a local activity' unless %i(note comment activity).include?(target.object_type) && target.local? + + replies_account_status_url(target.account, target, page_params) + end + # Primary audience of a status # Public statuses go out to primarily the public collection # Unlisted and private statuses go out primarily to the followers collection -- cgit