Browse Source

show unlisted posts and comments on user page

feature/opt-out-all
DashEightMate 1 year ago
parent
commit
626b0082ac
  1. 2
      server/lemmy_db/src/comment_view.rs
  2. 7
      server/lemmy_db/src/post_view.rs

2
server/lemmy_db/src/comment_view.rs

@ -225,7 +225,7 @@ impl<'a> CommentQueryBuilder<'a> {
};
//in these cases listingtype doesn't matter
if self.for_post_id.is_none() && self.for_comment_ids.is_none() && self.for_community_id.is_none() {
if self.for_post_id.is_none() && self.for_comment_ids.is_none() && self.for_community_id.is_none() && self.for_creator_id.is_none() {
query = match self.listing_type {
ListingType::Subscribed => query.filter(subscribed.eq(true)),
ListingType::Local => query.filter(community_local.eq(true)),

7
server/lemmy_db/src/post_view.rs

@ -247,7 +247,12 @@ impl<'a> PostQueryBuilder<'a> {
query = match self.listing_type {
ListingType::Subscribed => query.filter(subscribed.eq(true)),
ListingType::Local => query.filter(community_local.eq(true)),
ListingType::All => query.filter(community_hide_from_all.eq(false).or(subscribed.eq(true))),
ListingType::All => {
if self.for_creator_id.is_none() {
query = query.filter(community_hide_from_all.eq(false).or(subscribed.eq(true)));
}
query
},
_ => query,
};

Loading…
Cancel
Save