Skip to content

Resolve Mastodon boosts to the original post before building responses - #743

Merged
akirk merged 2 commits into
mainfrom
fix/mastodon-boost-original-status
Oct 14, 2026
Merged

akirk merged 2 commits into
mainfrom
fix/mastodon-boost-original-status

Conversation

@akirk

@akirk akirk commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Reeder for Mac failed to refresh or crashed when Friends returned a local boost wrapping another boost. Friends now resolves the boost target to the original post before constructing the Mastodon status, preserving the local boost's ID, account and timestamp and the original author's content and attachments. Cyclic or invalid targets are skipped. Friends remains authoritative for boost construction; EMA no longer needs to flatten nested boosts during JSON serialization.

This is the source fix identified through incremental Reeder debugging; the accompanying EMA image metadata correction is tracked in akirk/enable-mastodon-apps#355. A regression test exercises a multi-level boost before serialization.

Validation:

  • User verified that the final source-based media and boost fixes load successfully in Reeder for Mac.
  • Read-only wp --url=alex.kirk.at eval invoking Friends\Enable_Mastodon_Apps::mastodon_api_account_statuses: all 18 prepared boosts have zero nested boosts before serialization.
  • Live GET /api/v1/accounts/2/statuses?exclude_replies=1&limit=40: 35 statuses, zero nested boosts with EMA's status serializer restored.
  • PHP syntax checks for both changed files and targeted PHPCS passed.
  • composer check-cs ran; it reported duplicate-class warnings from an existing .claude/worktrees/show-likes-received checkout. Targeted vendor/bin/phpcs --standard=../friends/phpcs.xml ../friends/integrations/class-enable-mastodon-apps.php ../friends/tests/test-only-ema.php --report=summary passed from the EMA workspace.
  • Local PHPUnit could not start because the WordPress test library is missing. CI pending.
Changelog
  • Automatically create a changelog entry from the details below

Type

  • Fixed

Message

Resolve boosts of boosts to the original post in Mastodon account responses to prevent client refresh failures and crashes.

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 merged commit 95f5f42 into main Oct 14, 2026
27 checks passed
@akirk
akirk deleted the fix/mastodon-boost-original-status branch October 14, 2026 03:56
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