diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-05-04 21:14:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-04 21:14:34 +0200 |
commit | 6793bec4c67e695100cb4d8551f0bda0b7e87b12 (patch) | |
tree | 696e35d972dd537bc9b2551cc11eb95a0b6414d2 /app/lib/activitypub/tag_manager.rb | |
parent | d1aef17f9ad0074458ad0b390ac73db228928f07 (diff) |
Store URIs of follows, follow requests and blocks for ActivityPub (#7160)
Same URI passed between follow request and follow, since they are the same thing in ActivityPub. Local URIs are generated during creation using UUIDs and are passed to serializers.
Diffstat (limited to 'app/lib/activitypub/tag_manager.rb')
-rw-r--r-- | app/lib/activitypub/tag_manager.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/lib/activitypub/tag_manager.rb b/app/lib/activitypub/tag_manager.rb index fa2a8f7d3..908ea9639 100644 --- a/app/lib/activitypub/tag_manager.rb +++ b/app/lib/activitypub/tag_manager.rb @@ -38,6 +38,10 @@ class ActivityPub::TagManager end end + def generate_uri_for(_target) + URI.join(root_url, 'payloads', SecureRandom.uuid) + end + def activity_uri_for(target) raise ArgumentError, 'target must be a local activity' unless %i(note comment activity).include?(target.object_type) && target.local? |