From dddb51521f0ef539952fc3be45657a7b57b027b7 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sat, 17 Aug 2024 13:20:26 -0500 Subject: [PATCH] Fixes --- src/lib/api/feed-manip.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index d8deba1633..c2b80ca042 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -94,11 +94,18 @@ export class FeedViewPostsSlice { } const root = reply.root const rootIsView = - AppBskyFeedDefs.isPostView(root) || AppBskyFeedDefs.isBlockedPost(root) - // if parent is also the root, we have data! + AppBskyFeedDefs.isPostView(root) || + AppBskyFeedDefs.isBlockedPost(root) || + AppBskyFeedDefs.isNotFoundPost(root) + /* + * If the parent is also the root, we just so happen to have the data we + * need to compute if the parent's parent (grandparent) is blocked. This + * doesn't always happen, of course, but we can take advantage of it when + * it does. + */ const grandparent = - rootIsView && parent?.record?.reply?.parent?.uri === root?.uri - ? reply?.root + rootIsView && parent.record.reply?.parent.uri === root.uri + ? root : undefined const grandparentAuthor = reply.grandparentAuthor const isGrandparentBlocked = Boolean(