akirk / enable-mastodon-apps

Allow accessing your WordPress blog with Mastodon clients
https://wordpress.org/plugins/enable-mastodon-apps
GNU General Public License v2.0
34 stars 5 forks source link

Add `api/v1/accounts/update_credentials` route #157

Open mattwiebe opened 2 weeks ago

mattwiebe commented 2 weeks ago

This is a bit rough, but it's mostly working along with an ActivityPub plugin PR to enable profile editing from the apps! https://github.com/Automattic/wordpress-activitypub/pull/788

akirk commented 1 day ago

Thanks, this looks great. Amazing that you need to go into multipart decoding to get this to work.

I understand this only has editing for a real user on the blog, if we want to do the same for the blog user, we need to find an alternative to the is_user_member_of_blog() call (see https://github.com/Automattic/wordpress-activitypub/issues/800).

mattwiebe commented 12 hours ago

@akirk Thanks for looking! I was very grateful to have Claude 3.5 to assist me in understanding what was happening with PATCH requests and how to do my own multipart decoding.

I understand this only has editing for a real user on the blog, if we want to do the same for the blog user, we need to find an alternative to the is_user_member_of_blog() call

What I've done in https://github.com/Automattic/wordpress-activitypub/pull/788 is to swap over to the Blog User when WP Users are disabled (like on wpcom). Later we can figure out how to let users pick between Blog or User when both are active, but I figured that simply using the User account in that situation should be ok for now.