mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-10 06:54:12 +00:00
filter_removed_comments_from_search
This commit is contained in:
parent
d075acce43
commit
c6d6490afa
1 changed files with 3 additions and 1 deletions
|
@ -418,8 +418,10 @@ impl<'a> CommentQuery<'a> {
|
|||
.list(pool, self)
|
||||
.await?
|
||||
.into_iter()
|
||||
//filtering out removed comments from search results
|
||||
.filter(|c| !c.comment.removed)
|
||||
.map(|mut c| {
|
||||
if c.comment.deleted || c.comment.removed {
|
||||
if c.comment.deleted {
|
||||
c.comment.content = String::new();
|
||||
}
|
||||
c
|
||||
|
|
Loading…
Reference in a new issue