mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 12:51:18 +00:00
Dont show deleted / removed posts when searching. Fixes #4576
This commit is contained in:
parent
d3737d4453
commit
e055ca9b3b
1 changed files with 4 additions and 2 deletions
|
@ -397,9 +397,11 @@ fn queries<'a>() -> Queries<
|
|||
if let Some(search_term) = &options.search_term {
|
||||
let searcher = fuzzy_search(search_term);
|
||||
query = query.filter(
|
||||
post::name
|
||||
(post::name
|
||||
.ilike(searcher.clone())
|
||||
.or(post::body.ilike(searcher)),
|
||||
.or(post::body.ilike(searcher)))
|
||||
.and(post::removed.eq(false))
|
||||
.and(post::deleted.eq(false)),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue