akirk / friends

A social network between WordPresses. Privacy focused, by itself a self-hosted RSS++ reader with notifications.
https://wpfriends.at/
GNU General Public License v2.0
78 stars 13 forks source link

Separate Reblogging (and add draft editing) and ActivityPub Boosting #309

Closed akirk closed 1 month ago

akirk commented 2 months ago

This splits the Reblog button from the Boost button (when it's an ActivityPub post). This allows to:

reblog-separate

kgourlay commented 1 month ago

Excellent idea.

If I understand, then “Boost” will only show if ActivityPub is installed. I see two potential configuration settings to go with this feature.

kgourlay commented 1 month ago

After some thought, I think the simplest solution to formatting control might make the most sense. Simply add an additional css class when reblogging. In includes/class-frontend.php:

354c354
<       $reblog  = '<!-- wp:paragraph -->' . PHP_EOL . '<p>';
---
>       $reblog  = '<!-- wp:paragraph {"className":"friends-reblog"} -->' . PHP_EOL . '<p class="friends-reblog">';
371c371
<       $reblog .= '<!-- wp:quote -->' . PHP_EOL . '<blockquote class="wp-block-quote">';
---
>       $reblog .= '<!-- wp:quote {"className":"friends-reblog"} -->' . PHP_EOL . '<blockquote class="wp-block-quote friends-reblog">';
akirk commented 1 month ago

Thanks for the suggestion, @kgourlay! I have added the CSS classes as your code proposal suggested (feel free to create a PR in future, so that you can show up as a contributor, please!) but I just wanted to point you to the friends_reblog_pre_insert_post hook which would allow you to do more stuff to the post, like automatically adding a category or tag.

akirk commented 1 month ago

@kgourlay thank you for your settings suggestion. I've been thinking about it and actually think that simply removing the ActivityPub settings is the better option. There are too many settings already anyway.

This way, people can deliberately do the addition boost if they think. Practically, this would mean that both the reblog will show in their followers feed as a dedicated post, and the ActivityPub boost.

While a reblog is now one click more, I think it's worth double checking before posting something. The reblog without showing the editor was always a bit too much magic for me.

akirk commented 1 month ago

I am happy to add back the options if there is demand for it but for now I'd like to go by decision vs. option.