Fix post listing in nsfw communities (fixes #5685) (#5699)

This commit is contained in:
Nutomic 2025-05-20 14:49:18 +00:00 committed by GitHub
parent 9267b50bd7
commit 546372b163
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,9 +46,7 @@ pub async fn list_posts(
let show_hidden = data.show_hidden;
let show_read = data.show_read;
// Show nsfw content if param is true, or if content_warning exists
let show_nsfw = data
.show_nsfw
.unwrap_or(site_view.site.content_warning.is_some());
let show_nsfw = data.show_nsfw;
let hide_media = data.hide_media;
let no_comments_only = data.no_comments_only;
@ -98,7 +96,7 @@ pub async fn list_posts(
limit,
show_hidden,
show_read,
show_nsfw: Some(show_nsfw),
show_nsfw,
hide_media,
no_comments_only,
keyword_blocks,