Remove validation, fix type, fix ref
This commit is contained in:
@@ -206,12 +206,9 @@ async function fetchSubjects(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
const postsMap = new Map<string, AppBskyFeedDefs.PostView>()
|
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()) {
|
for (const post of postsChunks.flat()) {
|
||||||
if (
|
if (AppBskyFeedPost.isRecord(post.record)) {
|
||||||
AppBskyFeedPost.isRecord(post.record) &&
|
|
||||||
AppBskyFeedPost.validateRecord(post.record).success
|
|
||||||
) {
|
|
||||||
postsMap.set(post.uri, post)
|
postsMap.set(post.uri, post)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,11 +253,11 @@ function getSubjectUri(
|
|||||||
return notif.uri
|
return notif.uri
|
||||||
} else if (type === 'post-like' || type === 'repost') {
|
} else if (type === 'post-like' || type === 'repost') {
|
||||||
if (
|
if (
|
||||||
atp.fastIsType<AppBskyFeedRepost.Record>(
|
atp.dangerousIsType<AppBskyFeedRepost.Record>(
|
||||||
notif.record,
|
notif.record,
|
||||||
AppBskyFeedRepost.isRecord,
|
AppBskyFeedRepost.isRecord,
|
||||||
) ||
|
) ||
|
||||||
atp.fastIsType<AppBskyFeedLike.Record>(
|
atp.dangerousIsType<AppBskyFeedLike.Record>(
|
||||||
notif.record,
|
notif.record,
|
||||||
AppBskyFeedLike.isRecord,
|
AppBskyFeedLike.isRecord,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user