Rewrite of json creation #4
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
Dependencies
No dependencies set.
Reference: Event-Federation/wordpress-activitypub#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm not satisfied with how jsonld-objects (activities and transformed wp_posts) are created.
I plan to implement a builder pattern, with the transformers as directors.
due time is for the first prototype
rewrite of json creationto Rewrite of json creationThe basic current strucure of the ActivityPub creation is influenced by the ActivityPub library of landrok. Wheres the library uses a builder pattern approach the ActivityPub WordPress plugin currently ommits this logic.
Pixelfed, one other major ActivityPub platform sharing the PHP language uses Fractal to generate the json-ld output. For example: https://github.com/pixelfed/pixelfed/blob/dev/app/Transformer/ActivityPub/Verb/CreateNote.php
TODO: Review what CastoPod does... https://code.castopod.org/adaures/castopod/-/blob/develop/modules/Fediverse/Core/AbstractObject.php
@ruru4143 I used this branch for my current changes as I did not want to spam the upstream github draft pull request too much! https://code.event-federation.eu/Event-Federation/wordpress-activitypub/src/branch/dev/extendable-transformers
There is an (unpolished) but nice looking tribe transformer now, can you give me feedback?
I will give it manual test with my local (not ready to share) Mobilizon interoperability setup and have a look at the code later today.
https://github.com/Automattic/wordpress-activitypub/pull/629 implements a much more straight forward, though less powerful approach. This was chosen together with the upstream developers.