-
Notifications
You must be signed in to change notification settings - Fork 81
Handle Follow
rejects
#1865
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
Handle Follow
rejects
#1865
Conversation
This reverts commit e3e53b0.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
This looks really good. I think it'd be optimal to wait with merging until #1839 is in, to avoid making that PR even bigger.
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 adds basic support for handling remote Reject
activities for follow requests in ActivityPub.
- Introduce a
Reject
handler to process rejected follow activities and send notifications - Extend the
Following
collection with areject
method to clean up pending/following metadata - Register the new handler hook and include unit tests and a changelog entry
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/includes/handler/class-test-reject.php | Add unit tests covering validation and functional reject flow |
includes/handler/class-reject.php | Implement Reject handler with follow-reject logic |
includes/collection/class-following.php | Add reject method to remove pending/following metadata |
includes/class-handler.php | Register the Reject handler in the main dispatcher |
.github/changelog/1865-from-description | Add changelog entry for this feature |
Comments suppressed due to low confidence (2)
tests/includes/handler/class-test-reject.php:112
- [nitpick] The test method name implies the user remains in pending after a reject, but the assertions verify removal from pending. Consider renaming to
test_handle_reject_removes_user_from_pending
for clarity.
public function test_handle_reject_keeps_user_in_pending() {
tests/includes/handler/class-test-reject.php:164
- The inline comment conflicts with the following
assertNotContains
check. Update the comment to sayAssert: user_id is NOT in _activitypub_followed_by_pending
to match the assertion.
// Assert: user_id is STILL in _activitypub_followed_by_pending.
Implement basic
Reject
handling.The focus of this PR is on rejecting
Follow
requests, but we will add support for otherReject
s in the future: https://www.w3.org/wiki/ActivityPub/Primer/Reject_activity#Additional_uses_of_RejectProposed changes:
Follow
rejectsOther information:
Testing instructions:
Accept
ing andReject
ingFollow
requestsFollow
requestChangelog entry
Changelog Entry Details
Significance
Type
Message
Added basic support for handling remote rejections of follow requests.