Bump package, integrate new reasons
This commit is contained in:
@@ -10,79 +10,62 @@ export const NEW_TO_OLD_REASON_MAPPING: Record<string, string> = {}
|
||||
* Mapping of new (Ozone namespace) reason types to old reason types.
|
||||
*
|
||||
* Matches the mapping defined in the Ozone codebase:
|
||||
* @see https://github.com/bluesky-social/atproto/blob/09439d7d688294ad1a0c78a74b901ba2f7c5f4c3/packages/ozone/src/mod-service/profile.ts#L15
|
||||
* @see https://github.com/bluesky-social/atproto/blob/4c15fb47cec26060bff2e710e95869a90c9d7fdd/packages/ozone/src/mod-service/profile.ts#L16-L64
|
||||
*/
|
||||
export const NEW_TO_OLD_REASONS_MAP: Record<
|
||||
OzoneReportDefs.ReasonType,
|
||||
RootReportDefs.ReasonType
|
||||
> = {
|
||||
[OzoneReportDefs.REASONAPPEAL]: RootReportDefs.REASONAPPEAL,
|
||||
[OzoneReportDefs.REASONOTHER]: RootReportDefs.REASONOTHER,
|
||||
|
||||
// Violence-related
|
||||
[OzoneReportDefs.REASONVIOLENCEANIMALWELFARE]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCEANIMAL]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCETHREATS]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCEGRAPHICCONTENT]:
|
||||
RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCESELFHARM]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCEGLORIFICATION]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCEEXTREMISTCONTENT]:
|
||||
RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCETRAFFICKING]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONVIOLENCEOTHER]: RootReportDefs.REASONVIOLATION,
|
||||
|
||||
// Sexual-related
|
||||
[OzoneReportDefs.REASONSEXUALABUSECONTENT]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALNCII]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALSEXTORTION]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALDEEPFAKE]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALANIMAL]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALUNLABELED]: RootReportDefs.REASONSEXUAL,
|
||||
[OzoneReportDefs.REASONSEXUALOTHER]: RootReportDefs.REASONSEXUAL,
|
||||
|
||||
// Child safety
|
||||
[OzoneReportDefs.REASONCHILDSAFETYCSAM]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYGROOM]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYMINORPRIVACY]:
|
||||
RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYENDANGERMENT]:
|
||||
RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYPRIVACY]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYHARASSMENT]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYPROMOTION]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONCHILDSAFETYOTHER]: RootReportDefs.REASONVIOLATION,
|
||||
|
||||
// Harassment
|
||||
[OzoneReportDefs.REASONHARASSMENTTROLL]: RootReportDefs.REASONRUDE,
|
||||
[OzoneReportDefs.REASONHARASSMENTTARGETED]: RootReportDefs.REASONRUDE,
|
||||
[OzoneReportDefs.REASONHARASSMENTHATESPEECH]: RootReportDefs.REASONRUDE,
|
||||
[OzoneReportDefs.REASONHARASSMENTDOXXING]: RootReportDefs.REASONRUDE,
|
||||
[OzoneReportDefs.REASONHARASSMENTOTHER]: RootReportDefs.REASONRUDE,
|
||||
|
||||
// Misleading
|
||||
[OzoneReportDefs.REASONMISLEADINGSPAM]: RootReportDefs.REASONSPAM,
|
||||
[OzoneReportDefs.REASONMISLEADINGBOT]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGIMPERSONATION]:
|
||||
RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGSPAM]: RootReportDefs.REASONSPAM,
|
||||
[OzoneReportDefs.REASONMISLEADINGSCAM]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGSYNTHETICCONTENT]:
|
||||
RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGMISINFORMATION]:
|
||||
RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGELECTIONS]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONMISLEADINGOTHER]: RootReportDefs.REASONMISLEADING,
|
||||
|
||||
// Map all rule-related reasons to REASONVIOLATION
|
||||
[OzoneReportDefs.REASONRULESITESECURITY]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONRULESTOLENCONTENT]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONRULEPROHIBITEDSALES]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONRULEBANEVASION]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONRULEOTHER]: RootReportDefs.REASONVIOLATION,
|
||||
|
||||
// Information Integrity
|
||||
[OzoneReportDefs.REASONCIVICELECTORALPROCESS]:
|
||||
RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONCIVICDISCLOSURE]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONCIVICINTERFERENCE]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONCIVICMISINFORMATION]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONCIVICIMPERSONATION]: RootReportDefs.REASONMISLEADING,
|
||||
[OzoneReportDefs.REASONSELFHARMCONTENT]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONSELFHARMED]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONSELFHARMSTUNTS]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONSELFHARMSUBSTANCES]: RootReportDefs.REASONVIOLATION,
|
||||
[OzoneReportDefs.REASONSELFHARMOTHER]: RootReportDefs.REASONVIOLATION,
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +81,7 @@ export const OLD_TO_NEW_REASONS_MAP: Record<
|
||||
[RootReportDefs.REASONMISLEADING]: [OzoneReportDefs.REASONMISLEADINGOTHER],
|
||||
[RootReportDefs.REASONSEXUAL]: [OzoneReportDefs.REASONSEXUALUNLABELED],
|
||||
[RootReportDefs.REASONRUDE]: [OzoneReportDefs.REASONHARASSMENTOTHER],
|
||||
[RootReportDefs.REASONOTHER]: [OzoneReportDefs.REASONRULEOTHER],
|
||||
[RootReportDefs.REASONOTHER]: [OzoneReportDefs.REASONOTHER],
|
||||
[RootReportDefs.REASONAPPEAL]: [OzoneReportDefs.REASONAPPEAL],
|
||||
}
|
||||
|
||||
@@ -122,8 +105,6 @@ export const BSKY_LABELER_ONLY_REPORT_REASONS: Set<OzoneReportDefs.ReasonType> =
|
||||
new Set([
|
||||
OzoneReportDefs.REASONCHILDSAFETYCSAM,
|
||||
OzoneReportDefs.REASONCHILDSAFETYGROOM,
|
||||
OzoneReportDefs.REASONCHILDSAFETYENDANGERMENT,
|
||||
OzoneReportDefs.REASONCHILDSAFETYPROMOTION,
|
||||
OzoneReportDefs.REASONCHILDSAFETYOTHER,
|
||||
OzoneReportDefs.REASONVIOLENCEEXTREMISTCONTENT,
|
||||
])
|
||||
|
||||
@@ -9,7 +9,7 @@ export type ReportCategory =
|
||||
| 'harassmentHate'
|
||||
| 'misleading'
|
||||
| 'ruleBreaking'
|
||||
| 'civicIntegrity'
|
||||
| 'selfHarm'
|
||||
| 'other'
|
||||
|
||||
export type ReportCategoryConfig = {
|
||||
@@ -32,7 +32,7 @@ export function useReportOptions() {
|
||||
const categories: Record<ReportCategory, ReportCategoryConfig> = {
|
||||
childSafety: {
|
||||
key: 'childSafety',
|
||||
title: _(msg`Child Safety`),
|
||||
title: _(msg`Child safety`),
|
||||
description: _(
|
||||
msg`Content harming or endangering minors' safety and wellbeing`,
|
||||
),
|
||||
@@ -43,110 +43,94 @@ export function useReportOptions() {
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYCSAM,
|
||||
},
|
||||
{
|
||||
title: _(msg`Grooming or Predatory Behavior`),
|
||||
title: _(msg`Grooming or predatory behavior`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYGROOM,
|
||||
},
|
||||
{
|
||||
title: _(msg`Minor Privacy Violation`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYMINORPRIVACY,
|
||||
title: _(msg`Privacy violation of a minor`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYPRIVACY,
|
||||
},
|
||||
{
|
||||
title: _(msg`Child Endangerment`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYENDANGERMENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Minor Harassment or Bullying`),
|
||||
title: _(msg`Minor harassment or bullying`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYHARASSMENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Promotion of Child Exploitation`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYPROMOTION,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Child Safety Issue`),
|
||||
title: _(msg`Other child safety issue`),
|
||||
reason: OzoneReportDefs.REASONCHILDSAFETYOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
violencePhysicalHarm: {
|
||||
key: 'violencePhysicalHarm',
|
||||
title: _(msg`Violence or Physical Harm`),
|
||||
title: _(msg`Violence or physical harm`),
|
||||
sort: 2,
|
||||
description: _(msg`Threats, calls for violence, or graphic content`),
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Animal Welfare`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEANIMALWELFARE,
|
||||
title: _(msg`Animal welfare`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEANIMAL,
|
||||
},
|
||||
{
|
||||
title: _(msg`Threats or Incitement`),
|
||||
title: _(msg`Threats or incitement`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCETHREATS,
|
||||
},
|
||||
{
|
||||
title: _(msg`Graphic Violent Content`),
|
||||
title: _(msg`Graphic violent content`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEGRAPHICCONTENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Self Harm`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCESELFHARM,
|
||||
},
|
||||
{
|
||||
title: _(msg`Glorification of Violence`),
|
||||
title: _(msg`Glorification of violence`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEGLORIFICATION,
|
||||
},
|
||||
{
|
||||
title: _(msg`Extremist Content`),
|
||||
title: _(msg`Extremist content`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEEXTREMISTCONTENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Human Trafficking`),
|
||||
title: _(msg`Human trafficking`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCETRAFFICKING,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Violent Content`),
|
||||
title: _(msg`Other violent content`),
|
||||
reason: OzoneReportDefs.REASONVIOLENCEOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
sexualAdultContent: {
|
||||
key: 'sexualAdultContent',
|
||||
title: _(msg`Sexual and Adult Content`),
|
||||
title: _(msg`Sexual and adult content`),
|
||||
description: _(msg`Adult, child or animal sexual abuse`),
|
||||
sort: 3,
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Adult Sexual Abuse Content`),
|
||||
title: _(msg`Adult sexual abuse content`),
|
||||
reason: OzoneReportDefs.REASONSEXUALABUSECONTENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Non-Consensual Intimate Imagery`),
|
||||
title: _(msg`Non-consensual intimate imagery`),
|
||||
reason: OzoneReportDefs.REASONSEXUALNCII,
|
||||
},
|
||||
{
|
||||
title: _(msg`Sextortion`),
|
||||
reason: OzoneReportDefs.REASONSEXUALSEXTORTION,
|
||||
},
|
||||
{
|
||||
title: _(msg`Deepfake Adult Content`),
|
||||
title: _(msg`Deepfake adult content`),
|
||||
reason: OzoneReportDefs.REASONSEXUALDEEPFAKE,
|
||||
},
|
||||
{
|
||||
title: _(msg`Animal Sexual Abuse`),
|
||||
title: _(msg`Animal sexual abuse`),
|
||||
reason: OzoneReportDefs.REASONSEXUALANIMAL,
|
||||
},
|
||||
{
|
||||
title: _(msg`Unlabeled Adult Content`),
|
||||
title: _(msg`Unlabeled adult content`),
|
||||
reason: OzoneReportDefs.REASONSEXUALUNLABELED,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Sexual Violence Content`),
|
||||
title: _(msg`Other sexual violence content`),
|
||||
reason: OzoneReportDefs.REASONSEXUALOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
harassmentHate: {
|
||||
key: 'harassmentHate',
|
||||
title: _(msg`Harassment or Hate`),
|
||||
title: _(msg`Harassment or hate`),
|
||||
description: _(
|
||||
msg`Targeted attacks, hate speech, or organized harassment`,
|
||||
),
|
||||
@@ -157,11 +141,11 @@ export function useReportOptions() {
|
||||
reason: OzoneReportDefs.REASONHARASSMENTTROLL,
|
||||
},
|
||||
{
|
||||
title: _(msg`Targeted Harassment`),
|
||||
title: _(msg`Targeted harassment`),
|
||||
reason: OzoneReportDefs.REASONHARASSMENTTARGETED,
|
||||
},
|
||||
{
|
||||
title: _(msg`Hate Speech`),
|
||||
title: _(msg`Hate speech`),
|
||||
reason: OzoneReportDefs.REASONHARASSMENTHATESPEECH,
|
||||
},
|
||||
{
|
||||
@@ -169,7 +153,7 @@ export function useReportOptions() {
|
||||
reason: OzoneReportDefs.REASONHARASSMENTDOXXING,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Harassing or Hateful Content`),
|
||||
title: _(msg`Other harassing or hateful content`),
|
||||
reason: OzoneReportDefs.REASONHARASSMENTOTHER,
|
||||
},
|
||||
],
|
||||
@@ -181,7 +165,7 @@ export function useReportOptions() {
|
||||
sort: 5,
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Fake Account or Bot`),
|
||||
title: _(msg`Fake account or bot`),
|
||||
reason: OzoneReportDefs.REASONMISLEADINGBOT,
|
||||
},
|
||||
{
|
||||
@@ -197,74 +181,64 @@ export function useReportOptions() {
|
||||
reason: OzoneReportDefs.REASONMISLEADINGSCAM,
|
||||
},
|
||||
{
|
||||
title: _(msg`Unlabeled Generative AI or Synthetic Content`),
|
||||
reason: OzoneReportDefs.REASONMISLEADINGSYNTHETICCONTENT,
|
||||
title: _(msg`False information about elections`),
|
||||
reason: OzoneReportDefs.REASONMISLEADINGELECTIONS,
|
||||
},
|
||||
{
|
||||
title: _(msg`Harmful False Claims`),
|
||||
reason: OzoneReportDefs.REASONMISLEADINGMISINFORMATION,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Misleading Content`),
|
||||
title: _(msg`Other misleading content`),
|
||||
reason: OzoneReportDefs.REASONMISLEADINGOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
ruleBreaking: {
|
||||
key: 'ruleBreaking',
|
||||
title: _(msg`Breaking Network Rules`),
|
||||
title: _(msg`Breaking network rules`),
|
||||
description: _(msg`Hacking, stolen content, or prohibited sales`),
|
||||
sort: 6,
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Hacking or System Attacks`),
|
||||
title: _(msg`Hacking or system attacks`),
|
||||
reason: OzoneReportDefs.REASONRULESITESECURITY,
|
||||
},
|
||||
{
|
||||
title: _(msg`Stolen Content`),
|
||||
reason: OzoneReportDefs.REASONRULESTOLENCONTENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Promoting or Selling Prohibited Items or Services`),
|
||||
title: _(msg`Promoting or selling prohibited items or services`),
|
||||
reason: OzoneReportDefs.REASONRULEPROHIBITEDSALES,
|
||||
},
|
||||
{
|
||||
title: _(msg`Banned User Returning`),
|
||||
title: _(msg`Banned user returning`),
|
||||
reason: OzoneReportDefs.REASONRULEBANEVASION,
|
||||
},
|
||||
{
|
||||
title: _(msg`Other Network Rule-breaking`),
|
||||
title: _(msg`Other network rule-breaking`),
|
||||
reason: OzoneReportDefs.REASONRULEOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
civicIntegrity: {
|
||||
key: 'civicIntegrity',
|
||||
title: _(msg`Civic Integrity`),
|
||||
description: _(
|
||||
msg`Electoral interference or political process violations`,
|
||||
),
|
||||
selfHarm: {
|
||||
key: 'selfHarm',
|
||||
title: _(msg`Self-harm`),
|
||||
description: _(msg`Harmful or high-risk activities`),
|
||||
sort: 7,
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Electoral Process Violations`),
|
||||
reason: OzoneReportDefs.REASONCIVICELECTORALPROCESS,
|
||||
title: _(msg`Content promoting or depicting self-harm`),
|
||||
reason: OzoneReportDefs.REASONSELFHARMCONTENT,
|
||||
},
|
||||
{
|
||||
title: _(msg`Disclosure and Transparency Violations`),
|
||||
reason: OzoneReportDefs.REASONCIVICDISCLOSURE,
|
||||
title: _(msg`Eating disorders`),
|
||||
reason: OzoneReportDefs.REASONSELFHARMED,
|
||||
},
|
||||
{
|
||||
title: _(msg`Voter Intimidation or Interference`),
|
||||
reason: OzoneReportDefs.REASONCIVICINTERFERENCE,
|
||||
title: _(msg`Dangerous challenges or activities`),
|
||||
reason: OzoneReportDefs.REASONSELFHARMSTUNTS,
|
||||
},
|
||||
{
|
||||
title: _(msg`Election Misinformation`),
|
||||
reason: OzoneReportDefs.REASONCIVICMISINFORMATION,
|
||||
title: _(msg`Dangerous substances or drug abuse`),
|
||||
reason: OzoneReportDefs.REASONSELFHARMSUBSTANCES,
|
||||
},
|
||||
{
|
||||
title: _(msg`Impersonation of Electoral Officials or Entities`),
|
||||
reason: OzoneReportDefs.REASONCIVICIMPERSONATION,
|
||||
title: _(msg`Other dangerous content`),
|
||||
reason: OzoneReportDefs.REASONSELFHARMOTHER,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -276,7 +250,7 @@ export function useReportOptions() {
|
||||
options: [
|
||||
{
|
||||
title: _(msg`Other`),
|
||||
reason: OzoneReportDefs.REASONRULEOTHER,
|
||||
reason: OzoneReportDefs.REASONOTHER,
|
||||
},
|
||||
],
|
||||
isOther: true,
|
||||
|
||||
Reference in New Issue
Block a user