Skip to content
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 show deleted users or communities on profile page. #2450

Merged
merged 6 commits into from
Sep 28, 2022

Conversation

dessalines
Copy link
Member

@@ -58,7 +58,7 @@ where
let identifier = identifier.to_string();
Ok(
blocking(context.pool(), move |conn| {
DbActor::read_from_name(conn, &identifier, false)
DbActor::read_from_name(conn, &identifier, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are setting the param include_deleted to true, i dont think thats what you want.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep... when I was testing this, I couldn't even view the removed community's page as a mod to unremove it. The urls should still be accessible, just not visible from the main feeds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is used when a local user/community is searched with @user or !community. With the existing code, deleted/removed items are not shown. So you should revert this change, unless you noticed a bug in the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its also used by api_crud/community/read.rs, which is why after removing a community, it was incorrectly giving 404s:

https://github.com/LemmyNet/lemmy/blob/main/crates/api_crud/src/community/read.rs#L46

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, i guess you need to add a param include_deleted to fn resolve_actor_identifier(). Because at least for search that param should be false, not sure about other uses.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add this shortly.

@Nutomic Nutomic merged commit ee41654 into main Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleted / Removed communities show up as subscribed on a person's profile.
2 participants