-
-
Notifications
You must be signed in to change notification settings - Fork 857
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 / removed posts when searching. Fixes #4576 #4671
Conversation
crates/db_views/src/post_view.rs
Outdated
.or(post::body.ilike(searcher)), | ||
.or(post::body.ilike(searcher))) | ||
.and(post::removed.eq(false)) | ||
.and(post::deleted.eq(false)), |
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.
Use .filter(not(post::removed.or(post::deleted)))
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.
Good call.
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.
Good ole DeMorgan's Law.
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 was done for comments already, but should also be done for posts.