Cast for perf reasons
This commit is contained in:
@@ -255,11 +255,14 @@ function getSubjectUri(
|
|||||||
return notif.uri
|
return notif.uri
|
||||||
} else if (type === 'post-like' || type === 'repost') {
|
} else if (type === 'post-like' || type === 'repost') {
|
||||||
if (
|
if (
|
||||||
AppBskyFeedRepost.isValidRecord(notif.record) ||
|
AppBskyFeedRepost.isRecord(notif.record) ||
|
||||||
AppBskyFeedLike.isValidRecord(notif.record)
|
AppBskyFeedLike.isRecord(notif.record)
|
||||||
) {
|
) {
|
||||||
return typeof notif.record.subject?.uri === 'string'
|
const record = notif.record as
|
||||||
? notif.record.subject?.uri
|
| AppBskyFeedRepost.Record
|
||||||
|
| AppBskyFeedLike.Record
|
||||||
|
return typeof record.subject?.uri === 'string'
|
||||||
|
? record.subject?.uri
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
} else if (type === 'feedgen-like') {
|
} else if (type === 'feedgen-like') {
|
||||||
|
|||||||
Reference in New Issue
Block a user