Don't filter comments of posts from blocked community when viewing post detail (#2880)

This commit is contained in:
phankydn 2023-05-29 22:41:47 +07:00 committed by GitHub
parent 4240af86ca
commit d30839bea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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());
}