]> Untitled Git - lemmy.git/commitdiff
Exclude removed/deleted posts from community outbox (#2184)
authorNutomic <me@nutomic.com>
Fri, 1 Apr 2022 18:18:25 +0000 (18:18 +0000)
committerGitHub <noreply@github.com>
Fri, 1 Apr 2022 18:18:25 +0000 (18:18 +0000)
crates/db_schema/src/impls/post.rs

index c1f0fcbf231279abf6bb607e5a4b2f72fbbe6844..9a8bbcece80fd7b1eaf0c72d5990b1537cbdaba2 100644 (file)
@@ -50,6 +50,8 @@ impl Post {
     use crate::schema::post::dsl::*;
     post
       .filter(community_id.eq(the_community_id))
+      .filter(deleted.eq(false))
+      .filter(removed.eq(false))
       .then_order_by(published.desc())
       .then_order_by(stickied.desc())
       .limit(20)