Skip to content

Fix reblog acct for WordPress blog-wide actors#644

Merged
akirk merged 3 commits intomainfrom
fix/reblog-acct-webfinger
Apr 7, 2026
Merged

Fix reblog acct for WordPress blog-wide actors#644
akirk merged 3 commits intomainfrom
fix/reblog-acct-webfinger

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Apr 7, 2026

Summary

  • 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
  • When the URL can't be parsed, fall back to the _activitypub_acct meta stored on the ap_actor post
  • This fixes Mastodon apps prepopulating replies with @https://activitypub.blog/?author=0 instead of @activitypub.blog@activitypub.blog
  • Also makes convert_actor_to_mastodon_handle() public for testability

Test plan

  • Run phpunit --filter test_reblog_acct_uses_ap_actor_webfinger
  • Verify via Mastodon API: GET /api/v1/timelines/home for a reblogged post from a WordPress blog-wide actor should show proper acct field
Changelog
  • Automatically create a changelog entry from the details below

Type

  • Fixed

Message

Fix reblog account handle for WordPress blog-wide ActivityPub actors using ?author=0 URLs.

Test in WordPress Playground

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

@akirk akirk changed the base branch from main to update-readme-remove-plugin-installer April 7, 2026 06:38
Base automatically changed from update-readme-remove-plugin-installer to main April 7, 2026 06:41
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.
@akirk akirk force-pushed the fix/reblog-acct-webfinger branch from 3f4de5d to 3470924 Compare April 7, 2026 06:43
@akirk akirk merged commit 196f4e8 into main Apr 7, 2026
26 checks passed
@akirk akirk deleted the fix/reblog-acct-webfinger branch April 7, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant