A collection of Osprey rules for ATProto

add julie profile rule

Changed files
+44
config
models
rules
record
+4
config/labels.yaml
··· 59 59 valid_for: [UserId] 60 60 connotation: neutral 61 61 description: Account which is engaging in coordinated abuse. 62 + general-spam: 63 + valid_for: [UserId] 64 + connotation: neutral 65 + description: Account which is partaking in general spam.
+6
models/base.sml
··· 24 24 coerce_type=True, 25 25 ) 26 26 27 + Description: str = JsonData( 28 + path='$.eventMetadata.profile.description', 29 + required=False, 30 + coerce_type=True, 31 + ) 32 + 27 33 FollowersCount: int = JsonData( 28 34 path='$.eventMetadata.profile.followersCount', 29 35 required=False,
+3
rules/record/profile/index.sml
··· 12 12 Require( 13 13 rule='rules/record/profile/bsky_store.sml', 14 14 ) 15 + Require( 16 + rule='rules/record/profile/julie.sml', 17 + )
+31
rules/record/profile/julie.sml
··· 1 + Import( 2 + rules=[ 3 + 'models/base.sml', 4 + 'models/record/base.sml', 5 + 'models/record/profile.sml', 6 + ], 7 + ) 8 + 9 + JulieProfileRule = Rule( 10 + when_all=[ 11 + (StringContains(s=ProfileDescription, substrings=True, phrase='girly.bio') 12 + or StringContains(s=ProfileDescription, substrings=True, phrase='juliewaifu') 13 + or StringContains(s=ProfileDescription, substrings=True, phrase='waifujulie')), 14 + (StringContains(s=ProfileDisplayName, substrings=True, phrase='julie') or 15 + StringContains(s=Handle, substrings=True, phrase='julie')), 16 + AccountAgeSecondsUnwrapped <= 12*Hour, 17 + ], 18 + description='Julie profile' 19 + ) 20 + 21 + WhenRules( 22 + rules_any=[JulieProfileRule], 23 + then=[ 24 + AtprotoLabel( 25 + entity=UserId, 26 + label='general-spam', 27 + comment='Julie spam profile', 28 + expiration_in_hours=None, 29 + ), 30 + ], 31 + )