Skip to content

Commit

Permalink
Appview limit thread recursion (#1235)
Browse files Browse the repository at this point in the history
add base case for thread recursion
  • Loading branch information
dholms committed Jun 23, 2023
1 parent e522ece commit c96777d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/bsky/src/api/app/bsky/feed/getPostThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ const getParentData = (
uri: string,
depth: number,
): PostThread | ParentNotFoundError | undefined => {
if (depth < 1) return undefined
const post = postsByUri[uri]
if (!post) return new ParentNotFoundError(uri)
return {
Expand Down

0 comments on commit c96777d

Please sign in to comment.