Skip to content
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

Add Reblogging and Announce support for ActivityPub #168

Merged
merged 5 commits into from Mar 23, 2023
Merged

Conversation

akirk
Copy link
Owner

@akirk akirk commented Jan 7, 2023

This adds a button "Reblog" to each item. Depending on the setting (see below), it will post the same post under your own name on your blog, and if the post is on ActivityPub, it will announce = boost it there.

ActivityPub Settings

This adds a new ActivityPub settings page that allows to disable the automatic creation of a reblog post:

Screenshot 2023-03-23 at 16 57 54

Different buttons

If it is a post that came in via ActivityPub, then it can be either this
Screenshot 2023-03-23 at 18 00 21

or this, depending on the setting above.
Screenshot 2023-03-23 at 18 00 33

If it is a plain blog post, you get a reblog button:
Screenshot 2023-03-23 at 18 01 23

Reblogged/boosted posts will be annotated with a checkmark:

Screenshot 2023-03-23 at 18 06 02

Fixes #186.

@akirk
Copy link
Owner Author

akirk commented Jan 7, 2023

@pfefferle could you advise how I could best have these reblog posts appear as Announce in the outbox, can I just propose to add a filter to this for loop?

@pfefferle
Copy link

pfefferle commented Jan 7, 2023

Hey @akirk yes you could but it would make pagination really hard. As far as I know, the outbox is not (yet) really used by other platforms and I have some ideas to optimize the code. Maybe you skip the step and we chat about a more flexible inbox/outbox feature. Just as a quick sum up: there is a problem of different db objects that should all be in the outbox, like comments, posts, custom post types, ... that makes it impossible to generate the info on the fly (like I am currently doing with only posts). My idea is to build a custom post type for activities, that only reference the local WordPress object (maybe using taxonomies for inbox/outbox). So every activity on WordPress will generate an Outbox Activity and the push mechanism (cron) will also use this construct for publishing. To publish an activity in the future, you simply have to create such an custom post type activity and the rest is done by the plugin. I hope you got my point and I am curious about your feedback!

@akirk
Copy link
Owner Author

akirk commented Jan 7, 2023

@pfefferle, pagination is not my concern since the reblog'ed post would be 1:1 replaced with an announce activity.

Let's have a chat indeed about your ideas, a custom post type would certainly work, it'd just double the amount of data and has potential for inconsistencies (like when a plugin creates/updates/deletes a new post/comment without using the WordPress functions).

@akirk
Copy link
Owner Author

akirk commented Jan 7, 2023

Re outbox, I am using it in #163 for backfilling posts.

@akirk akirk merged commit 2131d00 into main Mar 23, 2023
47 checks passed
@akirk akirk deleted the activitypub-announce branch March 23, 2023 17:06
@akirk akirk restored the activitypub-announce branch September 16, 2023 07:48
@akirk akirk deleted the activitypub-announce branch September 18, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add boost / retweet / repost option in line in friends feed
2 participants