From 56b275acd43216e9d27248a55d4d01f6abd60920 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Fri, 1 Apr 2022 18:18:25 +0000 Subject: [PATCH] Exclude removed/deleted posts from community outbox (#2184) --- crates/db_schema/src/impls/post.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/db_schema/src/impls/post.rs b/crates/db_schema/src/impls/post.rs index c1f0fcbf..9a8bbcec 100644 --- a/crates/db_schema/src/impls/post.rs +++ b/crates/db_schema/src/impls/post.rs @@ -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) -- 2.44.1