From: phankydn <42137630+phankydn@users.noreply.github.com> Date: Mon, 29 May 2023 15:41:47 +0000 (+0700) Subject: Don't filter comments of posts from blocked community when viewing post detail (... X-Git-Url: http://these/git/readmes/%24%7Bsite.site_view.site.icon?a=commitdiff_plain;h=d30839bea163f3d62e910bc6e5a876a46d551844;p=lemmy.git Don't filter comments of posts from blocked community when viewing post detail (#2880) --- diff --git a/crates/db_views/src/comment_view.rs b/crates/db_views/src/comment_view.rs index 700d58f3..3657d942 100644 --- a/crates/db_views/src/comment_view.rs +++ b/crates/db_views/src/comment_view.rs @@ -312,7 +312,9 @@ impl<'a> CommentQuery<'a> { query = query.filter(local_user_language::language_id.is_not_null()); // Don't show blocked communities or persons - query = query.filter(community_block::person_id.is_null()); + if self.post_id.is_none() { + query = query.filter(community_block::person_id.is_null()); + } query = query.filter(person_block::person_id.is_null()); }