Simplify parsing
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
AppBskyActorDefs,
|
AppBskyActorDefs,
|
||||||
AppBskyActorStatus,
|
|
||||||
AppBskyFeedDefs,
|
AppBskyFeedDefs,
|
||||||
AppBskyFeedPost,
|
AppBskyFeedPost,
|
||||||
AppBskyGraphDefs,
|
AppBskyGraphDefs,
|
||||||
@@ -35,19 +34,11 @@ export function parseReportSubject(
|
|||||||
nsid: 'app.bsky.actor.profile',
|
nsid: 'app.bsky.actor.profile',
|
||||||
}
|
}
|
||||||
} else if (AppBskyActorDefs.isStatusView(subject)) {
|
} else if (AppBskyActorDefs.isStatusView(subject)) {
|
||||||
const record = subject.record
|
return {
|
||||||
if (
|
type: 'status',
|
||||||
bsky.dangerousIsType<AppBskyActorStatus.Record>(
|
uri: subject.uri,
|
||||||
record,
|
cid: subject.cid,
|
||||||
AppBskyActorStatus.isRecord,
|
nsid: 'app.bsky.actor.status',
|
||||||
)
|
|
||||||
) {
|
|
||||||
return {
|
|
||||||
type: 'status',
|
|
||||||
uri: subject.uri,
|
|
||||||
cid: subject.cid,
|
|
||||||
nsid: 'app.bsky.actor.status',
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (AppBskyGraphDefs.isListView(subject)) {
|
} else if (AppBskyGraphDefs.isListView(subject)) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user