-
-
Notifications
You must be signed in to change notification settings - Fork 880
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
Dont blank out post or community info. Fixes #1813 #1841
Conversation
Maybe we should discuss this on Lemmy, and get opinions from more people before merging. |
80508e7
to
2dcf053
Compare
I thought about moving the blanking into the view reads ... but it seemed too dangerous a thing. Its better to separate query logic from post-query manipulation. |
.filter(|p| p.post.deleted || p.post.removed) | ||
{ | ||
pv.post = pv.to_owned().post.blank_out_deleted_or_removed_info(); | ||
} |
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.
Postview also contains PersonSafe and CommunitySafe, i believe they also need to be blanked out here.
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.
Those don't need to be blanked, as they weren't the removed items. Its the same in community/read.rs, which also has a PersonSafe
.
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.
How do you know? Its possible that someone calls this endpoint with a post where the author or community was deleted. That would allow circumventing the blanking.
28b3961
to
7be52ab
Compare
@Nutomic This is actually passing: https://cloud.drone.io/LemmyNet/lemmy/1686 |
Seems like something is broken with the ARM builder (or with our tests). |
Going on record saying I really don't like this, since the title of the post and community would still be in the modlog, and would also show the reason for it being removed. This PR will let you go to removed posts and communities and see the content.