-
Notifications
You must be signed in to change notification settings - Fork 83
Fix Pixelfed interactions (Likes) #2448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
There was a problem hiding this 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 returntruewhen 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.
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.
There was a problem hiding this 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.
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:
is_activity_public()function to returntruewhen an activity has no recipientsOther information:
Testing instructions:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Fixed compatibility with Pixelfed and similar platforms by treating activities without recipients as public, ensuring boosts and reposts work correctly.