Filter out blocked posts from thread view (#2006)

This commit is contained in:
Eric Bailey
2023-11-27 14:41:53 -06:00
committed by GitHub
parent cd43adf698
commit 5fd2d36273
+4 -3
View File
@@ -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: {