Fix reblog acct for WordPress blog-wide actors#644
Merged
Conversation
Contributor
Test this PR in WordPress PlaygroundYou can test this pull request directly in WordPress Playground: This will install and activate the plugin with the changes from this PR. |
WordPress sites using ActivityPub with a blog-wide actor use URLs like ?author=0 which convert_actor_to_mastodon_handle() cannot parse into a user@host handle. Fall back to the _activitypub_acct stored on the ap_actor post, so Mastodon apps prepopulate replies with the correct @handle instead of the raw URL.
3f4de5d to
3470924
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
?author=0whichconvert_actor_to_mastodon_handle()cannot parse into auser@hosthandle_activitypub_acctmeta stored on theap_actorpost@https://activitypub.blog/?author=0instead of@activitypub.blog@activitypub.blogconvert_actor_to_mastodon_handle()public for testabilityTest plan
phpunit --filter test_reblog_acct_uses_ap_actor_webfingerGET /api/v1/timelines/homefor a reblogged post from a WordPress blog-wide actor should show properacctfieldChangelog
Type
Message
Fix reblog account handle for WordPress blog-wide ActivityPub actors using ?author=0 URLs.
Test in WordPress Playground