Filter out blocked posts from thread view (#2006)

zio/stable
Eric Bailey 2023-11-27 14:41:53 -06:00 committed by GitHub
parent cd43adf698
commit 5fd2d36273
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

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: {