From 2009ea30dbdfc0c7f731cb3c9c0adb9457257200 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 2 Jan 2025 15:11:29 -0600 Subject: [PATCH] Migrate to isValidRecord in PostFeedItem --- src/view/com/posts/PostFeedItem.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/com/posts/PostFeedItem.tsx b/src/view/com/posts/PostFeedItem.tsx index 4b18c470a6..8d6f41ac6b 100644 --- a/src/view/com/posts/PostFeedItem.tsx +++ b/src/view/com/posts/PostFeedItem.tsx @@ -232,7 +232,7 @@ let FeedItemInner = ({ * If `post[0]` in this slice is the actual root post (not an orphan thread), * then we may have a threadgate record to reference */ - const threadgateRecord = AppBskyFeedThreadgate.isRecord( + const threadgateRecord = AppBskyFeedThreadgate.isValidRecord( rootPost.threadgate?.record, ) ? rootPost.threadgate.record @@ -461,7 +461,7 @@ let PostContent = ({ }) const additionalPostAlerts: AppModerationCause[] = React.useMemo(() => { const isPostHiddenByThreadgate = threadgateHiddenReplies.has(post.uri) - const rootPostUri = AppBskyFeedPost.isRecord(post.record) + const rootPostUri = AppBskyFeedPost.isValidRecord(post.record) ? post.record?.reply?.root?.uri || post.uri : undefined const isControlledByViewer =