From a61dbf77071f3bcc2ef46903576e2a540e350d1a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 9 Jan 2026 10:12:24 -0600 Subject: [PATCH] Ah yeah let's not override types --- src/components/live/GoLiveDisabledDialog.tsx | 7 +++++-- src/components/moderation/ReportDialog/index.tsx | 7 +------ .../moderation/ReportDialog/utils/parseReportSubject.ts | 5 +++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/live/GoLiveDisabledDialog.tsx b/src/components/live/GoLiveDisabledDialog.tsx index 9a3c04286d..3d548bbb8f 100644 --- a/src/components/live/GoLiveDisabledDialog.tsx +++ b/src/components/live/GoLiveDisabledDialog.tsx @@ -46,6 +46,9 @@ export function DialogInner({ if (!agent.session?.did) { throw new Error('Not logged in') } + if (!status.uri || !status.cid) { + throw new Error('Status is missing uri or cid') + } if (__DEV__) { logger.info('Submitting go live appeal', { @@ -57,8 +60,8 @@ export function DialogInner({ reasonType: ToolsOzoneReportDefs.REASONAPPEAL, subject: { $type: 'com.atproto.repo.strongRef', - uri: status.uri!, - cid: status.cid!, + uri: status.uri, + cid: status.cid, }, reason: details, }, diff --git a/src/components/moderation/ReportDialog/index.tsx b/src/components/moderation/ReportDialog/index.tsx index 8ee55095fd..14354332cb 100644 --- a/src/components/moderation/ReportDialog/index.tsx +++ b/src/components/moderation/ReportDialog/index.tsx @@ -838,12 +838,7 @@ function LabelerCard({ {title} + style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}> By {sanitizeHandle(labeler.creator.handle, '@')} diff --git a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts index 0c07decc4c..950536199c 100644 --- a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts +++ b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts @@ -34,10 +34,11 @@ export function parseReportSubject( nsid: 'app.bsky.actor.profile', } } else if (AppBskyActorDefs.isStatusView(subject)) { + if (!subject.uri || !subject.cid) return return { type: 'status', - uri: subject.uri!, - cid: subject.cid!, + uri: subject.uri, + cid: subject.cid, nsid: 'app.bsky.actor.status', } } else if (AppBskyGraphDefs.isListView(subject)) {