mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
Fix nsfw posts showing for non-logged in users. Fixes #1614
This commit is contained in:
parent
100a56e8ef
commit
be0a34f811
@ -359,7 +359,7 @@ impl<'a> PostQueryBuilder<'a> {
|
|||||||
query = query.filter(post::creator_id.eq(creator_id));
|
query = query.filter(post::creator_id.eq(creator_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.show_nsfw.unwrap_or(true) {
|
if !self.show_nsfw.unwrap_or(false) {
|
||||||
query = query
|
query = query
|
||||||
.filter(post::nsfw.eq(false))
|
.filter(post::nsfw.eq(false))
|
||||||
.filter(community::nsfw.eq(false));
|
.filter(community::nsfw.eq(false));
|
||||||
|
@ -198,7 +198,7 @@ impl<'a> CommunityQueryBuilder<'a> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if !self.show_nsfw.unwrap_or(true) {
|
if !self.show_nsfw.unwrap_or(false) {
|
||||||
query = query.filter(community::nsfw.eq(false));
|
query = query.filter(community::nsfw.eq(false));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user