From 5fd2d36273c2e603084bdd58af43023e9622fb46 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 27 Nov 2023 14:41:53 -0600 Subject: [PATCH] Filter out blocked posts from thread view (#2006) --- src/state/queries/post-thread.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index 3c698946..b4a474ea 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -151,9 +151,10 @@ function responseToThreadNodes( : undefined, replies: node.replies?.length && direction !== 'up' - ? node.replies.map(reply => - responseToThreadNodes(reply, depth + 1, 'down'), - ) + ? node.replies + .map(reply => responseToThreadNodes(reply, depth + 1, 'down')) + // do not show blocked posts in replies + .filter(node => node.type !== 'blocked') : undefined, viewer: node.viewer, ctx: {