Cast for perf reasons

This commit is contained in:
Eric Bailey
2025-01-06 16:05:03 -06:00
parent 9e7d34a730
commit a4e4e12d57
+7 -4
View File
@@ -255,11 +255,14 @@ function getSubjectUri(
return notif.uri
} else if (type === 'post-like' || type === 'repost') {
if (
AppBskyFeedRepost.isValidRecord(notif.record) ||
AppBskyFeedLike.isValidRecord(notif.record)
AppBskyFeedRepost.isRecord(notif.record) ||
AppBskyFeedLike.isRecord(notif.record)
) {
return typeof notif.record.subject?.uri === 'string'
? notif.record.subject?.uri
const record = notif.record as
| AppBskyFeedRepost.Record
| AppBskyFeedLike.Record
return typeof record.subject?.uri === 'string'
? record.subject?.uri
: undefined
}
} else if (type === 'feedgen-like') {