filter_removed_comments_from_search

This commit is contained in:
tracyspacy 2024-04-16 15:42:16 +02:00
parent d075acce43
commit c6d6490afa

View file

@ -418,8 +418,10 @@ impl<'a> CommentQuery<'a> {
.list(pool, self) .list(pool, self)
.await? .await?
.into_iter() .into_iter()
//filtering out removed comments from search results
.filter(|c| !c.comment.removed)
.map(|mut c| { .map(|mut c| {
if c.comment.deleted || c.comment.removed { if c.comment.deleted {
c.comment.content = String::new(); c.comment.content = String::new();
} }
c c