Clarify handling
This commit is contained in:
@@ -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],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user