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 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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user