Migrate to isValidRecord in threadgate/util

This commit is contained in:
Eric Bailey
2025-01-02 17:05:55 -06:00
parent 19cb6aa605
commit df51b486f2
+1 -3
View File
@@ -6,9 +6,7 @@ export function threadgateViewToAllowUISetting(
threadgateView: AppBskyFeedDefs.ThreadgateView | undefined, threadgateView: AppBskyFeedDefs.ThreadgateView | undefined,
): ThreadgateAllowUISetting[] { ): ThreadgateAllowUISetting[] {
const threadgate = const threadgate =
threadgateView && threadgateView && AppBskyFeedThreadgate.isValidRecord(threadgateView.record)
AppBskyFeedThreadgate.isRecord(threadgateView.record) &&
AppBskyFeedThreadgate.validateRecord(threadgateView.record).success
? threadgateView.record ? threadgateView.record
: undefined : undefined
return threadgateRecordToAllowUISetting(threadgate) return threadgateRecordToAllowUISetting(threadgate)