Repository navigation
Keep comment content maps in the visitor rendering context - #3984
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3876.
Proposed changes:
contentMaprebuild. The base transformer already builds it as a logged-out visitor; rebuilding it after restoring the current user could include member-only text added by content filters.comment_textandactivitypub_the_content, verifying public content in the language map and restoration of the current user.Other information:
Both regression cases fail against the original code. All 11 comment-transformer tests (26 assertions), repository PHP lint, and PHPStan pass with the fix. The code review found no actionable issues.
The full local suite ran 4,080 tests with two failures:
Test_Actors_Inbox_Controller::test_user_inbox_post_verification(also present in the saved trunk run) andTest_Remote_Posts::test_add_recipients(passes when rerun in isolation). These results are not a clean full-suite pass.The existing unreleased
.github/changelog/fix-render-as-visitorentry covers this correction; this PR usesSkip Changelog.Testing instructions:
npm run env-test -- --filter=Transformer.Test_Comment.test_content_map_renders_as_visitorcases simulate filters that append different text for members and visitors. Confirm thatcontentand every language-map value contain the visitor text and that the logged-in user is restored.set_content_map()block to verify both new cases fail because the map contains member-only text.Changelog entry
Changelog Entry Details
Significance
Type
Message