Automattic / Automattic/wordpress-activitypub
ActivityPub API: Interaction with remote activities
- Dominant language
- PHP
- Stars
- 579
- Forks
- 92
- Avg merge
- 13h 5m
- Merged PRs (30d)
- 85
Description
### What
Interact with remote posts via ActivityPub API:
- ~Announce~
- Like
- Reply
- Vote
Related Automattic/wordpress-activitypub#3466
### Why
In order to participate with the broader Fediverse, outside of our own posts
### How
There seem to be 2 main blockers for interacting with remote posts.
1. The $result of `\apply_filters( 'activitypub_outbox_'` will be a WP_Comment with a `comment_post_ID` of 0
[https://github.com/Automattic/wordpress-activitypub/blob/45f34722368803a5f0895fa60707bd06f048613a/includes/collection/class-interactions.php#L48-L53]()
`$target_url` is not guaranteed to be another comment, so additional checks should search for an `ap_post`. In the case of an activity fetched via proxy, an `ap_post` will not be found since it exists only as a transient, so a pre comment hook would be needed to save it as an `ap_post`.
2. `Outbox::get_by_object_id()` will return `null` for a `WP_Comment`
[https://github.com/Automattic/wordpress-activitypub/blob/45f34722368803a5f0895fa60707bd06f048613a/includes/collection/class-outbox.php#L283-L284]()
Contributor guide
Research direction
Start with includes/collection/class-interactions.php, especially the activitypub_outbox_ filter result and target URL handling, then inspect includes/collection/class-outbox.php and Outbox::get_by_object_id(). Trace how remote Like, Reply, and Vote activities are represented, including proxy-fetched activities, and verify that each interaction can be created and retrieved through the ActivityPub API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100