-
Notifications
You must be signed in to change notification settings - Fork 79
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
Outbox Collection #593
base: trunk
Are you sure you want to change the base?
Outbox Collection #593
Conversation
Non-functional changes that split out the docs updates around users => actors from #593.
* Outbox: Use post meta instead of taxonomies * Add tests for meta values when adding Outbox items * fix indents --------- Co-authored-by: Matthias Pfefferle <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tried running this yet, but read through the changes and left a couple of comments/questions.
Really like the scheduler separation. 👍
What do we still need to do to ship this?
|
||
set_wp_object_state( $data, 'federate' ); | ||
|
||
$id = Outbox::add( $activity, $type, $user_id, $content_visibility ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that all of this functionality in add_to_outbox
should just live inside of Outbox::add
? Which would then either leave us with a thin wrapper in this function, or we can then get rid of the wrapper entirely?
Co-authored-by: Matt Wiebe <[email protected]>
* Update file name * Extend WP_REST_Controller * First pass at updated outbox endpoint * Remove expectation of having cc in the response * Update object type to be a bit more descriptive * First pass at create endpoint * Fix tests * Get Activity Type from meta after #1173 * Fix rest_url_path Props @pfefferle * Return accurate number of outbox items Props @pfefferle * Add more tests and remove unnecessary out-of-bounds error * Remove POST endpoint for now We currently don't have a use-case for it. * Limit Outbox by activity type and visibility * Account for posts without visibility meta Props @pfefferle * phpcs * Allow logged in users to see all activity types * Add request context to remaining hooks * Default query to limit activities Adds an exception for requests with privileges. * Slightly improve query
…/wordpress-activitypub into add/outbox-collection
$args | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ( 'Create' === $type && ACTIVITYPUB_CONTENT_VISIBILITY_PUBLIC && $content_visibility && ACTIVITYPUB_ACTOR_AND_BLOG_MODE === \get_option( 'activitypub_actor_mode', ACTIVITYPUB_ACTOR_MODE ) ) { | |
// @todo transform $data to announce | |
add_to_outbox( $data, 'Announce', Actors::BLOG_USER_ID ); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would edits also need to be supported, or do those merely reference the original post? If so might we need to send those direct post updates to followers of the Blog Actor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you only share the id of a post via an Announce
, so only Creates
are important here... the updates will be done automatically afterwards... no need to re-announce them...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you only share the id of a post via an Announce, so only Creates are important
Perfect. But the further question:
Let's say I follow a WP example.com
site from [email protected]
with ACTIVITYPUB_ACTOR_AND_BLOG_MODE === true
. I follow [email protected]
, but I don't follow [email protected]
. I receive the Announce
of a post by [email protected]
. But the user then edits the post. Will mastodon.social
get notified of the edit with nobody on the instance following [email protected]
?
Working on an Outbox Collection, to better support Blogs with lots of Followers, Retries and Activities other than Post.
/cc @mediaformat @Menrath @ruru4143 @akirk @mattwiebe
Proposed changes:
Other information:
Testing instructions:
Fixes #961.