]> cat aescling's git repositories - mastodon.git/commit
Refactor ActivityPub handling to prepare for non-Account actors (#19212)
authorClaire <claire.github-309c@sitedethib.com>
Wed, 21 Sep 2022 20:45:57 +0000 (22:45 +0200)
committeraescling <aescling+gitlab@cat.family>
Thu, 17 Nov 2022 03:03:50 +0000 (22:03 -0500)
commita3429af14bc9683a429e8a80a4a7a037ea12d262
tree82a0f9dfb2a7a51471bd29d3b74b77c0a5e68b4f
parentb5237f0807fc3033b857af6485c1fbb9cf6d4806
Refactor ActivityPub handling to prepare for non-Account actors (#19212)

* Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

ActivityPub::FetchRemoteAccountService is kept as a wrapper for when the actor is
specifically required to be an Account

* Refactor SignatureVerification to allow non-Account actors

* fixup! Move ActivityPub::FetchRemoteAccountService to ActivityPub::FetchRemoteActorService

* Refactor ActivityPub::FetchRemoteKeyService to potentially return non-Account actors

* Refactor inbound ActivityPub payload processing to accept non-Account actors

* Refactor inbound ActivityPub processing to accept activities relayed through non-Account

* Refactor how Account key URIs are built

* Refactor Request and drop unused key_id_format parameter

* Rename ActivityPub::Dereferencer `signature_account` to `signature_actor`
41 files changed:
app/controllers/accounts_controller.rb
app/controllers/activitypub/claims_controller.rb
app/controllers/activitypub/collections_controller.rb
app/controllers/activitypub/followers_synchronizations_controller.rb
app/controllers/activitypub/inboxes_controller.rb
app/controllers/activitypub/outboxes_controller.rb
app/controllers/activitypub/replies_controller.rb
app/controllers/concerns/signature_verification.rb
app/controllers/follower_accounts_controller.rb
app/controllers/following_accounts_controller.rb
app/controllers/statuses_controller.rb
app/controllers/tags_controller.rb
app/lib/activitypub/activity.rb
app/lib/activitypub/dereferencer.rb
app/lib/activitypub/linked_data_signature.rb
app/lib/activitypub/tag_manager.rb
app/lib/request.rb
app/serializers/activitypub/public_key_serializer.rb
app/services/activitypub/fetch_remote_account_service.rb
app/services/activitypub/fetch_remote_actor_service.rb [new file with mode: 0644]
app/services/activitypub/fetch_remote_key_service.rb
app/services/activitypub/process_collection_service.rb
app/services/fetch_resource_service.rb
app/services/keys/claim_service.rb
app/services/resolve_url_service.rb
app/workers/activitypub/delivery_worker.rb
app/workers/activitypub/processing_worker.rb
spec/controllers/accounts_controller_spec.rb
spec/controllers/activitypub/collections_controller_spec.rb
spec/controllers/activitypub/followers_synchronizations_controller_spec.rb
spec/controllers/activitypub/inboxes_controller_spec.rb
spec/controllers/activitypub/outboxes_controller_spec.rb
spec/controllers/activitypub/replies_controller_spec.rb
spec/controllers/concerns/signature_verification_spec.rb
spec/controllers/statuses_controller_spec.rb
spec/lib/activitypub/activity/announce_spec.rb
spec/lib/activitypub/dereferencer_spec.rb
spec/lib/activitypub/linked_data_signature_spec.rb
spec/services/activitypub/fetch_remote_actor_service_spec.rb [new file with mode: 0644]
spec/services/activitypub/process_collection_service_spec.rb
spec/services/fetch_resource_service_spec.rb