Clarify handling

This commit is contained in:
Eric Bailey
2025-10-15 16:18:32 -05:00
parent 853ecbb547
commit 542801c485
@@ -143,11 +143,13 @@ function Inner(props: ReportDialogProps) {
if (BSKY_LABELER_ONLY_REPORT_REASONS.has(state.selectedOption.reason)) { if (BSKY_LABELER_ONLY_REPORT_REASONS.has(state.selectedOption.reason)) {
return l.creator.did === BSKY_LABELER_DID return l.creator.did === BSKY_LABELER_DID
} }
const reasonTypes: string[] | undefined = l.reasonTypes const supportedReasonTypes: string[] | undefined = l.reasonTypes
if (reasonTypes === undefined) return true if (supportedReasonTypes === undefined) return true
return ( return (
reasonTypes.includes(state.selectedOption.reason) || // supports new reason type
reasonTypes.includes( supportedReasonTypes.includes(state.selectedOption.reason) ||
// supports old reason type (backwards compat)
supportedReasonTypes.includes(
NEW_TO_OLD_REASONS_MAP[state.selectedOption.reason], NEW_TO_OLD_REASONS_MAP[state.selectedOption.reason],
) )
) )