From 546372b16382448d85144a0df36bc324461b5275 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Tue, 20 May 2025 14:49:18 +0000 Subject: [PATCH] Fix post listing in nsfw communities (fixes #5685) (#5699) --- crates/apub/src/api/list_posts.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/apub/src/api/list_posts.rs b/crates/apub/src/api/list_posts.rs index e6dfe8aa0..7d181678e 100644 --- a/crates/apub/src/api/list_posts.rs +++ b/crates/apub/src/api/list_posts.rs @@ -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,