Skip to content

Disable ActivityPub federation for cached friend posts#665

Merged
akirk merged 1 commit into
mainfrom
fix/disable-activitypub-for-cached-posts
May 6, 2026
Merged

Disable ActivityPub federation for cached friend posts#665
akirk merged 1 commit into
mainfrom
fix/disable-activitypub-for-cached-posts

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented May 6, 2026

Summary

  • Cached friend posts (friend_post_cache CPT) are remote content stored locally and should never be announced as the site's own ActivityPub activity.
  • Hook activitypub_is_post_disabled to short-circuit the ActivityPub plugin's post lifecycle handling for cached posts. Without this, the plugin's lifecycle override could keep firing Updates whenever a cached post is re-fetched if its activitypub_status post meta was ever set.

Test plan

  • With both Friends and ActivityPub plugins active, refresh a followed feed and confirm no ActivityPub Update activities are dispatched for cached posts.
  • Confirm own (non-cached) posts still federate normally.

Test in WordPress Playground

Cached posts are remote content stored locally; they must never be
announced as the site's own activity. Hook activitypub_is_post_disabled
to short-circuit the ActivityPub plugin's lifecycle handling for the
friend_post_cache CPT.
@akirk akirk merged commit d1f1b24 into main May 6, 2026
26 checks passed
@akirk akirk deleted the fix/disable-activitypub-for-cached-posts branch May 6, 2026 08:29
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