From 62ecada300ba0239980975e7ef5a3e0fe35c3fa8 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 5 Feb 2025 11:06:00 -0600 Subject: [PATCH] Use asPredicate --- src/state/queries/threadgate/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/state/queries/threadgate/index.ts b/src/state/queries/threadgate/index.ts index 87e6d6666c..0eb1e72979 100644 --- a/src/state/queries/threadgate/index.ts +++ b/src/state/queries/threadgate/index.ts @@ -2,6 +2,7 @@ import { AppBskyFeedDefs, AppBskyFeedGetPostThread, AppBskyFeedThreadgate, + asPredicate, AtUri, BskyAgent, } from '@atproto/api' @@ -138,7 +139,10 @@ export async function getThreadgateRecord({ }), ) - if (data.value && AppBskyFeedThreadgate.isValidRecord(data.value)) { + if ( + data.value && + asPredicate(AppBskyFeedThreadgate.validateRecord)(data.value) + ) { return data.value } else { return null