]> Untitled Git - lemmy.git/commitdiff
Don't filter comments of posts from blocked community when viewing post detail (...
authorphankydn <42137630+phankydn@users.noreply.github.com>
Mon, 29 May 2023 15:41:47 +0000 (22:41 +0700)
committerGitHub <noreply@github.com>
Mon, 29 May 2023 15:41:47 +0000 (11:41 -0400)
crates/db_views/src/comment_view.rs

index 700d58f36cb0bb0fbed305c83729e1532e4f9d10..3657d9429e8cbdb9634f2cae43ab1dd51fddefe9 100644 (file)
@@ -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());
     }