Exclude removed/deleted posts from community outbox (#2184)

page-attachment
Nutomic 2022-04-01 18:18:25 +00:00 committed by GitHub
parent 589d952a95
commit 56b275acd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

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