-
-
Notifications
You must be signed in to change notification settings - Fork 884
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
Conversation
dessalines
commented
Sep 23, 2022
- Fixes Deleted / Removed communities show up as subscribed on a person's profile. #2448
crates/apub/src/fetcher/mod.rs
Outdated
@@ -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) |
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.
You are setting the param include_deleted
to true, i dont think thats what you want.
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.
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.
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 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.
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.
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
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.
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.
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.
I'll add this shortly.