-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor ActivityStreams collections #1242
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #1166
Close #1165
Close #1232
/as/collection
container and put all collections in ititemsPerPage
,dereferenceItems
,sortPredicate
andsortOrder
(see Refactor collections creation #1166)CollectionsRegistryService
to only automate the creation of collectionsActivitypubApiService
to handle POST to inbox and outbox routesControlledCollectionMixin
(not needed anymore by the InboxService and OutboxService)Breaking changes⚠️
AS collections are now handled like regular LDP resources, except the
get
,post
andpatch
actions are modified through the ControlledContainerMixin (and theput
action is forbidden). TheActivitypubCollectionService
has thus many changes to its actions:create
action has been removed. Collections should be created by POSTing them to the collections container.get
andexist
actions now take aresourceUri
parameter instead ofcollectionUri
.attach
action has been renamedadd
(attach
is used to attach a resource to a container)detach
action has been renamedremove
(detach
is used to detach a resource from a container)By default, the ActivitypubObjectService replaces deleted objects with Tombstones. This allows other servers to know what was the type of a deleted resource. If you don't want to enable this usage, you can pass
activateTombstones: false
to the ActivitypubService (oractivitypub: { activateTombstones: false }
to the CoreService).The
/likes
and/replies
collections are only attached to objects when items are added to them. So you should not assume these collections exist in your frontend code.Migration
Import the
ActivityPubMigrationService
from the@semapps/activitypub
package, and enter these commands in Moleculer REPL:If you have created custom collections, you will need to persist the options as well. To do that, you can call the
activitypub.collections-registry.updateCollectionsOptions
, passing the collection options in thecollection
param.