This commit is contained in:
Nick 2023-07-18 00:20:37 +02:00 committed by GitHub
commit 9bb3e3525b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View File

@ -32,6 +32,7 @@ object SpaceSafetyLabelType extends SafetyLabelType {
s.SpaceSafetyLabelType.CivicIntegrityMisinfo -> CivicIntegrityMisinfo, s.SpaceSafetyLabelType.CivicIntegrityMisinfo -> CivicIntegrityMisinfo,
s.SpaceSafetyLabelType.MedicalMisinfo -> MedicalMisinfo, s.SpaceSafetyLabelType.MedicalMisinfo -> MedicalMisinfo,
s.SpaceSafetyLabelType.GenericMisinfo -> GenericMisinfo, s.SpaceSafetyLabelType.GenericMisinfo -> GenericMisinfo,
s.SpaceSafetyLabelType.WarMisinfo -> WarMisinfo,
s.SpaceSafetyLabelType.DmcaWithheld -> DmcaWithheld, s.SpaceSafetyLabelType.DmcaWithheld -> DmcaWithheld,
s.SpaceSafetyLabelType.HatefulHighRecall -> HatefulHighRecall, s.SpaceSafetyLabelType.HatefulHighRecall -> HatefulHighRecall,
s.SpaceSafetyLabelType.ViolenceHighRecall -> ViolenceHighRecall, s.SpaceSafetyLabelType.ViolenceHighRecall -> ViolenceHighRecall,
@ -63,6 +64,7 @@ object SpaceSafetyLabelType extends SafetyLabelType {
case object NsfwHighRecall extends SpaceSafetyLabelType case object NsfwHighRecall extends SpaceSafetyLabelType
case object CivicIntegrityMisinfo extends SpaceSafetyLabelType case object CivicIntegrityMisinfo extends SpaceSafetyLabelType
case object MedicalMisinfo extends SpaceSafetyLabelType case object MedicalMisinfo extends SpaceSafetyLabelType
case object WarMisinfo extends SpaceSafetyLabelType
case object GenericMisinfo extends SpaceSafetyLabelType case object GenericMisinfo extends SpaceSafetyLabelType
case object DmcaWithheld extends SpaceSafetyLabelType case object DmcaWithheld extends SpaceSafetyLabelType
case object HatefulHighRecall extends SpaceSafetyLabelType case object HatefulHighRecall extends SpaceSafetyLabelType

View File

@ -83,9 +83,9 @@ object TweetSafetyLabelType extends SafetyLabelType {
s.SafetyLabelType.LowQuality -> LowQuality, s.SafetyLabelType.LowQuality -> LowQuality,
s.SafetyLabelType.LowQualityMention -> LowQualityMention, s.SafetyLabelType.LowQualityMention -> LowQualityMention,
s.SafetyLabelType.MisinfoCivic -> MisinfoCivic, s.SafetyLabelType.MisinfoCivic -> MisinfoCivic,
s.SafetyLabelType.MisinfoCrisis -> MisinfoCrisis,
s.SafetyLabelType.MisinfoGeneric -> MisinfoGeneric, s.SafetyLabelType.MisinfoGeneric -> MisinfoGeneric,
s.SafetyLabelType.MisinfoMedical -> MisinfoMedical, s.SafetyLabelType.MisinfoMedical -> MisinfoMedical,
s.SafetyLabelType.MisinfoWar -> MisinfoWar,
s.SafetyLabelType.NsfaHighPrecision -> NsfaHighPrecision, s.SafetyLabelType.NsfaHighPrecision -> NsfaHighPrecision,
s.SafetyLabelType.NsfaHighRecall -> NsfaHighRecall, s.SafetyLabelType.NsfaHighRecall -> NsfaHighRecall,
s.SafetyLabelType.NsfwCardImage -> NsfwCardImage, s.SafetyLabelType.NsfwCardImage -> NsfwCardImage,
@ -249,7 +249,6 @@ object TweetSafetyLabelType extends SafetyLabelType {
case object HighProactiveTosScore extends TweetSafetyLabelType case object HighProactiveTosScore extends TweetSafetyLabelType
case object SafetyCrisis extends TweetSafetyLabelType case object SafetyCrisis extends TweetSafetyLabelType
case object MisinfoCivic extends TweetSafetyLabelType case object MisinfoCivic extends TweetSafetyLabelType
case object MisinfoCrisis extends TweetSafetyLabelType
case object MisinfoGeneric extends TweetSafetyLabelType case object MisinfoGeneric extends TweetSafetyLabelType
case object MisinfoMedical extends TweetSafetyLabelType case object MisinfoMedical extends TweetSafetyLabelType
case object AdsManagerDenyList extends TweetSafetyLabelType case object AdsManagerDenyList extends TweetSafetyLabelType

View File

@ -112,9 +112,9 @@ object Reason {
case object FirstPageSearchResult extends Reason case object FirstPageSearchResult extends Reason
case object MisinfoCivic extends Reason case object MisinfoCivic extends Reason
case object MisinfoCrisis extends Reason
case object MisinfoGeneric extends Reason case object MisinfoGeneric extends Reason
case object MisinfoMedical extends Reason case object MisinfoMedical extends Reason
case object MisinfoWar extends Reason
case object Misleading extends Reason case object Misleading extends Reason
case object ExclusiveTweet extends Reason case object ExclusiveTweet extends Reason
case object CommunityNotAMember extends Reason case object CommunityNotAMember extends Reason

View File

@ -51,9 +51,9 @@ object PublicInterest {
PolicyInViolation.Scam -> Scams, PolicyInViolation.Scam -> Scams,
PolicyInViolation.PlatformManipulation -> PlatformManipulation, PolicyInViolation.PlatformManipulation -> PlatformManipulation,
PolicyInViolation.MisinformationCivic -> MisinfoCivic, PolicyInViolation.MisinformationCivic -> MisinfoCivic,
PolicyInViolation.AbusePolicyUkraineCrisisMisinformation -> MisinfoCrisis,
PolicyInViolation.MisinformationGeneric -> MisinfoGeneric, PolicyInViolation.MisinformationGeneric -> MisinfoGeneric,
PolicyInViolation.MisinformationMedical -> MisinfoMedical, PolicyInViolation.MisinformationMedical -> MisinfoMedical,
PolicyInViolation.MisinformationWar -> MisinfoWar,
) )
val reasonToPolicyInViolation: Map[Reason, PolicyInViolation] = Map( val reasonToPolicyInViolation: Map[Reason, PolicyInViolation] = Map(
@ -76,9 +76,9 @@ object PublicInterest {
Scams -> PolicyInViolation.Scam, Scams -> PolicyInViolation.Scam,
PlatformManipulation -> PolicyInViolation.PlatformManipulation, PlatformManipulation -> PolicyInViolation.PlatformManipulation,
MisinfoCivic -> PolicyInViolation.MisinformationCivic, MisinfoCivic -> PolicyInViolation.MisinformationCivic,
MisinfoCrisis -> PolicyInViolation.AbusePolicyUkraineCrisisMisinformation,
MisinfoGeneric -> PolicyInViolation.MisinformationGeneric, MisinfoGeneric -> PolicyInViolation.MisinformationGeneric,
MisinfoMedical -> PolicyInViolation.MisinformationMedical, MisinfoMedical -> PolicyInViolation.MisinformationMedical,
MisinfoWar -> PolicyInViolation.MisinformationWar,
) )
val ReasonToSafetyResultReason: Map[Reason, SafetyResultReason] = Map( val ReasonToSafetyResultReason: Map[Reason, SafetyResultReason] = Map(
@ -101,7 +101,6 @@ object PublicInterest {
Scams -> SafetyResultReason.Scams, Scams -> SafetyResultReason.Scams,
PlatformManipulation -> SafetyResultReason.PlatformManipulation, PlatformManipulation -> SafetyResultReason.PlatformManipulation,
MisinfoCivic -> SafetyResultReason.MisinfoCivic, MisinfoCivic -> SafetyResultReason.MisinfoCivic,
MisinfoCrisis -> SafetyResultReason.MisinfoCrisis,
MisinfoGeneric -> SafetyResultReason.MisinfoGeneric, MisinfoGeneric -> SafetyResultReason.MisinfoGeneric,
MisinfoMedical -> SafetyResultReason.MisinfoMedical, MisinfoMedical -> SafetyResultReason.MisinfoMedical,
IpiDevelopmentOnly -> SafetyResultReason.DevelopmentOnlyPublicInterest IpiDevelopmentOnly -> SafetyResultReason.DevelopmentOnlyPublicInterest
@ -118,7 +117,7 @@ object PublicInterest {
TweetSafetyLabelType.MisinfoCivic, TweetSafetyLabelType.MisinfoCivic,
TweetSafetyLabelType.MisinfoGeneric, TweetSafetyLabelType.MisinfoGeneric,
TweetSafetyLabelType.MisinfoMedical, TweetSafetyLabelType.MisinfoMedical,
TweetSafetyLabelType.MisinfoCrisis, TweetSafetyLabelType.MisinfoWar,
TweetSafetyLabelType.IpiDevelopmentOnly TweetSafetyLabelType.IpiDevelopmentOnly
) )
@ -173,15 +172,15 @@ class PublicInterestActionBuilder[T <: Action]() extends ActionBuilder[T] {
case Some((TweetSafetyLabelType.MisinfoCivic, source)) => case Some((TweetSafetyLabelType.MisinfoCivic, source)) =>
(Reason.MisinfoCivic, LimitedEngagementReason.fromString(source.map(_.name))) (Reason.MisinfoCivic, LimitedEngagementReason.fromString(source.map(_.name)))
case Some((TweetSafetyLabelType.MisinfoCrisis, source)) =>
(Reason.MisinfoCrisis, LimitedEngagementReason.fromString(source.map(_.name)))
case Some((TweetSafetyLabelType.MisinfoGeneric, source)) => case Some((TweetSafetyLabelType.MisinfoGeneric, source)) =>
(Reason.MisinfoGeneric, LimitedEngagementReason.fromString(source.map(_.name))) (Reason.MisinfoGeneric, LimitedEngagementReason.fromString(source.map(_.name)))
case Some((TweetSafetyLabelType.MisinfoMedical, source)) => case Some((TweetSafetyLabelType.MisinfoMedical, source)) =>
(Reason.MisinfoMedical, LimitedEngagementReason.fromString(source.map(_.name))) (Reason.MisinfoMedical, LimitedEngagementReason.fromString(source.map(_.name)))
case Some((TweetSafetyLabelType.MisinfoWar, source)) =>
(Reason.MisinfoWar, LimitedEngagementReason.fromString(source.map(_.name)))
case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) => case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) =>
(Reason.IpiDevelopmentOnly, Some(LimitedEngagementReason.NonCompliant)) (Reason.IpiDevelopmentOnly, Some(LimitedEngagementReason.NonCompliant))
@ -220,15 +219,15 @@ class PublicInterestComplianceTweetNoticeActionBuilder
case Some((TweetSafetyLabelType.MisinfoCivic, _)) => case Some((TweetSafetyLabelType.MisinfoCivic, _)) =>
Reason.MisinfoCivic Reason.MisinfoCivic
case Some((TweetSafetyLabelType.MisinfoCrisis, _)) =>
Reason.MisinfoCrisis
case Some((TweetSafetyLabelType.MisinfoGeneric, _)) => case Some((TweetSafetyLabelType.MisinfoGeneric, _)) =>
Reason.MisinfoGeneric Reason.MisinfoGeneric
case Some((TweetSafetyLabelType.MisinfoMedical, _)) => case Some((TweetSafetyLabelType.MisinfoMedical, _)) =>
Reason.MisinfoMedical Reason.MisinfoMedical
case Some((TweetSafetyLabelType.MisinfoWar, _)) =>
Reason.MisinfoWar
case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) => case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) =>
Reason.IpiDevelopmentOnly Reason.IpiDevelopmentOnly
@ -257,15 +256,15 @@ class PublicInterestDropActionBuilder extends ActionBuilder[Drop] {
case Some(TweetSafetyLabelType.MisinfoCivic) => case Some(TweetSafetyLabelType.MisinfoCivic) =>
Reason.MisinfoCivic Reason.MisinfoCivic
case Some(TweetSafetyLabelType.MisinfoCrisis) =>
Reason.MisinfoCrisis
case Some(TweetSafetyLabelType.MisinfoGeneric) => case Some(TweetSafetyLabelType.MisinfoGeneric) =>
Reason.MisinfoGeneric Reason.MisinfoGeneric
case Some(TweetSafetyLabelType.MisinfoMedical) => case Some(TweetSafetyLabelType.MisinfoMedical) =>
Reason.MisinfoMedical Reason.MisinfoMedical
case Some(TweetSafetyLabelType.MisinfoWar) =>
Reason.MisinfoWar
case _ => case _ =>
Reason.OneOff Reason.OneOff
} }