about summary refs log tree commit diff
path: root/app/lib/activitypub
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-02-28 18:16:34 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-02-28 18:16:34 +0100
commitd8498b39838eb352a9b268e0f22b1b025320dc73 (patch)
tree0a1d8fd3dd955ede6f000f965c508106e21d0753 /app/lib/activitypub
parent9d3c6f1849120e732a9230959cb302575765ea8c (diff)
Give the `replies` collection an identifier and enable pagination (#10128)
Diffstat (limited to 'app/lib/activitypub')
-rw-r--r--app/lib/activitypub/tag_manager.rb6
1 files changed, 6 insertions, 0 deletions
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