diff --git a/visibilitylib/src/main/scala/com/twitter/visibility/models/TweetSafetyLabel.scala b/visibilitylib/src/main/scala/com/twitter/visibility/models/TweetSafetyLabel.scala index 043c15282..9d2bb694b 100644 --- a/visibilitylib/src/main/scala/com/twitter/visibility/models/TweetSafetyLabel.scala +++ b/visibilitylib/src/main/scala/com/twitter/visibility/models/TweetSafetyLabel.scala @@ -85,6 +85,7 @@ object TweetSafetyLabelType extends SafetyLabelType { s.SafetyLabelType.MisinfoCivic -> MisinfoCivic, s.SafetyLabelType.MisinfoGeneric -> MisinfoGeneric, s.SafetyLabelType.MisinfoMedical -> MisinfoMedical, + s.SafetyLabelType.MisinfoWar -> MisinfoWar, s.SafetyLabelType.NsfaHighPrecision -> NsfaHighPrecision, s.SafetyLabelType.NsfaHighRecall -> NsfaHighRecall, s.SafetyLabelType.NsfwCardImage -> NsfwCardImage, @@ -99,6 +100,7 @@ object TweetSafetyLabelType extends SafetyLabelType { s.SafetyLabelType.Pdna -> Pdna, s.SafetyLabelType.RecommendationsLowQuality -> RecommendationsLowQuality, s.SafetyLabelType.RitoActionedTweet -> RitoActionedTweet, + s.SafetyLabelType.SafetyCrisis -> SafetyCrisis, s.SafetyLabelType.SearchBlacklist -> SearchBlacklist, s.SafetyLabelType.SearchBlacklistHighRecall -> SearchBlacklistHighRecall, s.SafetyLabelType.SemanticCoreMisinformation -> SemanticCoreMisinformation, diff --git a/visibilitylib/src/main/scala/com/twitter/visibility/rules/Action.scala b/visibilitylib/src/main/scala/com/twitter/visibility/rules/Action.scala index 11124ee12..e4b125085 100644 --- a/visibilitylib/src/main/scala/com/twitter/visibility/rules/Action.scala +++ b/visibilitylib/src/main/scala/com/twitter/visibility/rules/Action.scala @@ -114,6 +114,7 @@ object Reason { case object MisinfoCivic extends Reason case object MisinfoGeneric extends Reason case object MisinfoMedical extends Reason + case object MisinfoWar extends Reason case object Misleading extends Reason case object ExclusiveTweet extends Reason case object CommunityNotAMember extends Reason diff --git a/visibilitylib/src/main/scala/com/twitter/visibility/rules/PublicInterestRules.scala b/visibilitylib/src/main/scala/com/twitter/visibility/rules/PublicInterestRules.scala index 266a60853..09c79fb28 100644 --- a/visibilitylib/src/main/scala/com/twitter/visibility/rules/PublicInterestRules.scala +++ b/visibilitylib/src/main/scala/com/twitter/visibility/rules/PublicInterestRules.scala @@ -53,6 +53,7 @@ object PublicInterest { PolicyInViolation.MisinformationCivic -> MisinfoCivic, PolicyInViolation.MisinformationGeneric -> MisinfoGeneric, PolicyInViolation.MisinformationMedical -> MisinfoMedical, + PolicyInViolation.MisinformationWar -> MisinfoWar, ) val reasonToPolicyInViolation: Map[Reason, PolicyInViolation] = Map( @@ -77,6 +78,7 @@ object PublicInterest { MisinfoCivic -> PolicyInViolation.MisinformationCivic, MisinfoGeneric -> PolicyInViolation.MisinformationGeneric, MisinfoMedical -> PolicyInViolation.MisinformationMedical, + MisinfoWar -> PolicyInViolation.MisinformationWar, ) val ReasonToSafetyResultReason: Map[Reason, SafetyResultReason] = Map( @@ -115,6 +117,7 @@ object PublicInterest { TweetSafetyLabelType.MisinfoCivic, TweetSafetyLabelType.MisinfoGeneric, TweetSafetyLabelType.MisinfoMedical, + TweetSafetyLabelType.MisinfoWar, TweetSafetyLabelType.IpiDevelopmentOnly ) @@ -175,6 +178,9 @@ class PublicInterestActionBuilder[T <: Action]() extends ActionBuilder[T] { case Some((TweetSafetyLabelType.MisinfoMedical, source)) => (Reason.MisinfoMedical, LimitedEngagementReason.fromString(source.map(_.name))) + case Some((TweetSafetyLabelType.MisinfoWar, source)) => + (Reason.MisinfoWar, LimitedEngagementReason.fromString(source.map(_.name))) + case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) => (Reason.IpiDevelopmentOnly, Some(LimitedEngagementReason.NonCompliant)) @@ -219,6 +225,9 @@ class PublicInterestComplianceTweetNoticeActionBuilder case Some((TweetSafetyLabelType.MisinfoMedical, _)) => Reason.MisinfoMedical + case Some((TweetSafetyLabelType.MisinfoWar, _)) => + Reason.MisinfoWar + case Some((TweetSafetyLabelType.IpiDevelopmentOnly, _)) => Reason.IpiDevelopmentOnly @@ -253,6 +262,9 @@ class PublicInterestDropActionBuilder extends ActionBuilder[Drop] { case Some(TweetSafetyLabelType.MisinfoMedical) => Reason.MisinfoMedical + case Some(TweetSafetyLabelType.MisinfoWar) => + Reason.MisinfoWar + case _ => Reason.OneOff }