fix(swarm,timeline): Include node NSFW status in post filtering

- Add node NSFW status check to post filtering logic
- Filter posts where either the post itself or its parent node is marked NSFW
- Ensure comprehensive NSFW content filtering across both post and node levels
- Prevents NSFW content from NSFW nodes from appearing in filtered timelines
This commit is contained in:
AskIt
2026-01-26 03:53:25 +01:00
parent 53b573b28d
commit f17ffd8c88
+1 -1
View File
@@ -181,7 +181,7 @@ export async function fetchSwarmTimeline(
// A post is NSFW if it's explicitly marked OR comes from an NSFW node
const filteredPosts = includeNsfw
? result.posts
: result.posts.filter(p => !p.isNsfw);
: result.posts.filter(p => !p.isNsfw && !p.nodeIsNsfw);
allPosts.push(...filteredPosts);
}