Skip to content

Conversation

@pfefferle
Copy link
Member

@pfefferle pfefferle commented Nov 12, 2025

This PR fixes handling of ActivityPub activities from Pixelfed and other platforms by treating activities with no recipients as public, which aligns with the ActivityPub specification.

Fixes https://wordpress.org/support/topic/boosts-reposts-not-working-in-pixelfed/

Proposed changes:

  • Updated is_activity_public() function to return true when an activity has no recipients
  • Added test coverage for Like activities with trailing slashes in object URLs (common with Pixelfed)
  • Updated existing tests to reflect the new behavior where activities without recipients are treated as public

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to '..'

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Fixed compatibility with Pixelfed and similar platforms by treating activities without recipients as public, ensuring boosts and reposts work correctly.

Ensures object URLs in Like activities are normalized by removing trailing slashes before processing, improving compatibility with platforms like Pixelfed. Adds tests to verify correct handling and storage of Like activities with trailing slashes in object URLs.
Added a check in is_activity_public to return true when the recipients list is empty, ensuring activities without specified recipients are considered public.
Updated logic to treat activities without recipients as public, delivering them to all local actors. Adjusted related tests to reflect this behavior and removed unnecessary untrailingslashit calls for URL normalization.
Copilot AI review requested due to automatic review settings November 12, 2025 11:50
Copilot finished reviewing on behalf of pfefferle November 12, 2025 11:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes handling of ActivityPub activities from Pixelfed and other platforms by treating activities with no recipients as public, which aligns with the ActivityPub specification.

  • Updated is_activity_public() function to return true when an activity has no recipients
  • Added test coverage for Like activities with trailing slashes in object URLs (common with Pixelfed)
  • Updated existing tests to reflect the new behavior where activities without recipients are treated as public

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
includes/functions.php Added check in is_activity_public() to treat activities with no recipients as public
tests/phpunit/tests/includes/rest/class-test-inbox-controller.php Updated test to expect all local actors to receive activities with no recipients (treated as public)
tests/phpunit/tests/includes/handler/class-test-like.php Added test for Like activities with trailing slashes in object URLs
tests/phpunit/tests/includes/collection/class-test-inbox.php Updated visibility test and added test for Like activities with trailing slashes
tests/phpunit/tests/includes/class-test-functions.php Updated test expectation for activities with no standard recipient fields to be treated as public

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pfefferle pfefferle changed the title Fix/pixelfed interactions Fix Pixelfed interactions (Likes) Nov 12, 2025
@pfefferle pfefferle requested a review from obenland November 12, 2025 12:18
@pfefferle pfefferle self-assigned this Nov 12, 2025
pfefferle and others added 2 commits November 12, 2025 15:20
Co-authored-by: Konstantin Obenland <obenland@gmx.de>
Updated get_activity_visibility to return public visibility for activities without recipients. Adjusted related unit test to reflect this behavior change, ensuring empty activities are now considered public.
Copilot finished reviewing on behalf of pfefferle November 12, 2025 14:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pfefferle pfefferle merged commit 532b4b0 into trunk Nov 12, 2025
18 checks passed
@pfefferle pfefferle deleted the fix/pixelfed-interactions branch November 12, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants