Remove validation, fix type, fix ref

This commit is contained in:
Eric Bailey
2025-01-07 12:46:21 -06:00
parent 4a1695b798
commit 5dbb2c2b4c
+4 -7
View File
@@ -206,12 +206,9 @@ async function fetchSubjects(
),
)
const postsMap = new Map<string, AppBskyFeedDefs.PostView>()
const packsMap = new Map<string, AppBskyGraphDefs.StarterPackView>()
const packsMap = new Map<string, AppBskyGraphDefs.StarterPackViewBasic>()
for (const post of postsChunks.flat()) {
if (
AppBskyFeedPost.isRecord(post.record) &&
AppBskyFeedPost.validateRecord(post.record).success
) {
if (AppBskyFeedPost.isRecord(post.record)) {
postsMap.set(post.uri, post)
}
}
@@ -256,11 +253,11 @@ function getSubjectUri(
return notif.uri
} else if (type === 'post-like' || type === 'repost') {
if (
atp.fastIsType<AppBskyFeedRepost.Record>(
atp.dangerousIsType<AppBskyFeedRepost.Record>(
notif.record,
AppBskyFeedRepost.isRecord,
) ||
atp.fastIsType<AppBskyFeedLike.Record>(
atp.dangerousIsType<AppBskyFeedLike.Record>(
notif.record,
AppBskyFeedLike.isRecord,
)