mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 21:01:23 +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 {
|
if let Some(search_term) = &options.search_term {
|
||||||
let searcher = fuzzy_search(search_term);
|
let searcher = fuzzy_search(search_term);
|
||||||
query = query.filter(
|
query = query.filter(
|
||||||
post::name
|
(post::name
|
||||||
.ilike(searcher.clone())
|
.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