What do you think about: if someone uses the ActivityPub plugin to directly federate his posts, he could install your "Share on Mastodon" plugin, to not crosspost, but automatically boost the just federated post using a Mastodon Account?
@pfefferle Let me look into that. Assuming there are a number of ActivityPub action hooks for something like this, are they documented somewhere?
I’m going to have to play with ActivityPub some more … I always wondered, is there a way to only post certain post types to AP followers? A hook, maybe, to allow certain posts to be skipped? Or base the activity type on a post’s post format or post type?
@janboddez If a hook is missing, this is added fast :)
There is not yet a good documentation, but if you tell me what you need, I can provide the needed informations.
There is not yet a filter, to decide what to post and what not. At least not on post level. You can enable/disable federation for Post-Types though. I am planning to add a checkbox to the editor, to enable/disable federation per post and this could be also filterable.
@pfefferle Watch out with editor checkboxes! Super weird behavior (if you use classic meta boxes) in combination with Gutenberg.
For instance, I noticed the AP plugin uses transition_post_status and checks 'publish' === $new_status && 'publish' !== $old_status. With Gutenberg, the first time this hook is run, it will not have access to any $_POST variables (like a meta box checkbox).
It is then run a 2nd time during which is does, but by then $old_status will already be publish!
@pfefferle (Of course if you schedule AP requests a bit into the future, etc., this may not be an issue. On Share on Mastodon, I check a meta value before scheduling, however [and then again later on, just in case the author changed it]. Like, you could still schedule the requests but then quit if the checkbox was disabled.
And then you’ll face other issues, 😅 like when people post from a mobile app and there is no checkbox. Been there, done that.)
Add comment