-
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
Add a parser to the Friends Plugin #172
Add a parser to the Friends Plugin #172
Conversation
This is awesome and exactly what I had in mind as we first talked about a cooperation! |
Ok, I released 2.1.0 of the Friends plugin with updated filters for this, so this PR can now move forward. |
Do you have an idea how we can guide this feature? |
What I do for plugins like friends-parser-fraidyscrape when they are installed on their own is to put the Friends icon there and an About menu entry like this: But I don't think it's such a good idea in this case, so I made this little mockup. We could add a "About" or "Welcome" screen in addition to the settings like this: The current settings would be on their own tab: Here is the text I whipped up for the about section, it would also allow to explain things better than today. I initially had a hard time understanding what service the plugin actually provided and which username to follow.
|
@akirk I'd like to ask a clarifying question. Does the Friends Plugin create posts from those you follow on the frontend of the WordPress site or just in the backend? |
@akirk another question is whether the Friends Plugin works for non-Admin accounts. I explicitly do not use an Admin account even on my own personal sites. If the Friends Plugin has only been tested with an Admin account, and assumes all functionality within the Admin account context then that really needs to be changed. From a security standpoint people shouldn't be using a full admin account on their sites as their main account. |
There terms frontend and backend are probably not precise enough. There is a "friends frontend" at To your point about administrator priviledges, I have opened an issue here: akirk/friends#120 |
@akirk how is this handling the visibility of posts? I ask because on Mastodon people can set a Toot to only be visible to followers, those posts shouldn't be publicly displayed on a WordPress instance. |
As I said, the cached post type is meant for your eyes and your friends page, plus external posts (at least from other Friends plugin users) that are posted as private, will also have the post_status private. |
|
||
\add_action( 'activitypub_inbox_create', array( $this, 'handle_received_activity' ), 10, 2 ); | ||
\add_action( 'activitypub_inbox_accept', array( $this, 'handle_received_activity' ), 10, 2 ); | ||
\add_filter( 'friends_user_feed_activated', array( $this, 'follow_user' ), 10 ); |
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.
I used the cron to send the activities asynchronous, to not slow down activities on the WordPress plattform.
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.
Good point, I added that.
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.
LGTM;
@akirk have you verified that it is functional?
It didn't work. fixed it with another commit. |
@pfefferle, I have now added support for the |
@akirk ready to merge? |
Yes, I just also quickly added attachment support, the unit tests help ensure that things still work :) There will be follow-up PRs to improve it further but for now I am happy! |
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.
LGTM
With this patch your WordPress can not only be followed on ActivityPub platforms (like Mastodon) but you can also follow people on those platforms, with the plan eliminating the need for having another account on an instance.
If the Friends plugin is activated on your WordPress then it will add an ActivityPub "parser" (that's the concept of getting content into the Friends plugin although here we're obviously subscribing to the ActivityPub activities and will receive them in real time).
Here are some screenshots of the patch in action:
While I have marked this PR as draft, it is functional but probably needs some refinement.
I also took the liberty to refactor the Health Check for the Webfinger URL into a
Webfinger::resolve
which is needed for determining the right URL from a username in the@username@domain
format.