-
Notifications
You must be signed in to change notification settings - Fork 83
Show warning when user cannot federate replies to fediverse comments #2817
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
base: trunk
Are you sure you want to change the base?
Conversation
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 improves the user experience by showing a clear warning message when logged-in users without ActivityPub capability attempt to reply to fediverse comments, preventing confusion where replies would silently fail to federate.
Changes:
- Added warning message for logged-in users without ActivityPub capability when viewing fediverse comments
- Updated documentation to clarify the three handling cases for fediverse comment replies
- Added comprehensive test coverage for local comments, fediverse comments with capable users, fediverse comments with non-capable users, and non-logged-in users
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
includes/class-comment.php |
Implements the warning message logic for logged-in users without federation capability, with proper escaping and an extensibility filter |
tests/phpunit/tests/includes/class-test-comment.php |
Adds four comprehensive test cases covering all scenarios: local comments, capable users, non-capable users, and non-logged-in users |
.github/changelog/2816-from-description |
Documents the change as a patch-level addition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bfa97e2 to
9f8327c
Compare
- When a logged-in user without ActivityPub capability tries to reply to a fediverse comment, show a warning message instead of the reply link. - Unify `are_comments_allowed()` and `should_be_federated()` to both use `user_can( $user_id, 'activitypub' )` instead of inconsistent `publish_posts`. - Added tests for all three comment reply link cases. Fixes #2816
9f8327c to
07c72b0
Compare
|
@davemart-in @robertbpugh @jeherve I would love to have your feedback on the message. See screenshot? Can you think of a shorter one? Is it fine like it is? |
|
Thoughts on something like:
|
|
Yes! (Sorry for the missing context) |
Should we add a mention that the author will consequently not receive a notification of your reply? Since we have
|
|
@jeherve Ah, I misread the comment of @davemart-in ! The message replaces the link completely, so it is not even possible to send a reply! I think it makes no sense to have local replies to comments from the fediverse because this would confuse people even more. |
3d911e1 to
457edc4
Compare
Fixes #2816
Proposed changes:
are_comments_allowed()andshould_be_federated()to both useuser_can( $user_id, 'activitypub' )instead of the inconsistentpublish_postscheck.Other information:
Testing instructions:
activitypubcapability (e.g., subscriber role)activitypubcapability (e.g., editor role)Changelog entry
Changelog Entry Details
Significance
Type
Message
Show warning instead of reply link when logged-in user cannot federate replies to fediverse comments.