Documentation
¶
Overview ¶
Example automod rules and helpers.
Index ¶
- func AccountDemoPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func AccountPrivateDemoPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func AggressivePromotionRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func BadHashtagsPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func BadWordDIDRule(c *automod.AccountContext) error
- func BadWordHandleRule(c *automod.AccountContext) error
- func BadWordOtherRecordRule(c *automod.RecordContext) error
- func BadWordPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func BadWordProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
- func BadWordRecordKeyRule(c *automod.RecordContext) error
- func BlobVerifyRule(c *automod.RecordContext, blob lexutil.LexBlob, data []byte) error
- func BotLinkProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
- func CelebSpamIdentityRule(c *automod.AccountContext) error
- func CelebSpamProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
- func DefaultRules() automod.RuleSet
- func DeleteInteractionRule(c *automod.RecordContext) error
- func DistinctMentionsRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func GtubePostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func GtubeProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
- func HarassmentProtectionOzoneEventRule(c *automod.OzoneEventContext) error
- func HarassmentTargetInteractionPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func HarassmentTrivialPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func IdenticalReplyPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func IdenticalReplyPostSameParentRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func InteractionChurnRule(c *automod.RecordContext) error
- func MisleadingLinkUnicodeReversalPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func MisleadingMentionPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func MisleadingURLPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func NewAccountBotEmailRule(c *automod.AccountContext) error
- func NewAccountRule(c *automod.AccountContext) error
- func NostrSpamPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func ReplyCountPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func ReplySingleBadWordPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func SimpleBotPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func TooManyHashtagsPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func TooManyRepostRule(c *automod.RecordContext) error
- func TrivialSpamPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func YoungAccountDistinctMentionsRule(c *automod.RecordContext, post *appbsky.FeedPost) error
- func YoungAccountDistinctRepliesRule(c *automod.RecordContext, post *appbsky.FeedPost) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountDemoPostRule ¶
func AccountDemoPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
this is a dummy rule to demonstrate accessing account metadata (eg, profile) from within post handler
func AccountPrivateDemoPostRule ¶
func AccountPrivateDemoPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
dummy rule. this leaks PII (account email) in logs and should never be used in real life
func AggressivePromotionRule ¶
func AggressivePromotionRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for new accounts, with a commercial or donation link in profile, which directly reply to several accounts
this rule depends on ReplyCountPostRule() to set counts
func BadHashtagsPostRule ¶
func BadHashtagsPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for specific hashtags from known lists
func BadWordDIDRule ¶
func BadWordDIDRule(c *automod.AccountContext) error
func BadWordHandleRule ¶
func BadWordHandleRule(c *automod.AccountContext) error
func BadWordOtherRecordRule ¶
func BadWordOtherRecordRule(c *automod.RecordContext) error
scans for bad keywords in records other than posts and profiles
func BadWordPostRule ¶
func BadWordPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func BadWordProfileRule ¶
func BadWordProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
func BadWordRecordKeyRule ¶
func BadWordRecordKeyRule(c *automod.RecordContext) error
scans the record-key for all records
func BlobVerifyRule ¶
func BotLinkProfileRule ¶
func BotLinkProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
func CelebSpamIdentityRule ¶
func CelebSpamIdentityRule(c *automod.AccountContext) error
func CelebSpamProfileRule ¶
func CelebSpamProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
func DefaultRules ¶
IMPORTANT: reminder that these are the indigo-edition rules, not production rules
func DeleteInteractionRule ¶
func DeleteInteractionRule(c *automod.RecordContext) error
func DistinctMentionsRule ¶
func DistinctMentionsRule(c *automod.RecordContext, post *appbsky.FeedPost) error
DistinctMentionsRule looks for accounts which mention an unusually large number of distinct accounts per period.
func GtubePostRule ¶
func GtubePostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func GtubeProfileRule ¶
func GtubeProfileRule(c *automod.RecordContext, profile *appbsky.ActorProfile) error
func HarassmentProtectionOzoneEventRule ¶
func HarassmentProtectionOzoneEventRule(c *automod.OzoneEventContext) error
looks for new harassment protection tags on accounts, and logs them
func HarassmentTargetInteractionPostRule ¶
func HarassmentTargetInteractionPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for new accounts, which interact with frequently-harassed accounts, and report them for review
func HarassmentTrivialPostRule ¶
func HarassmentTrivialPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for new accounts, which frequently post the same type of content
func IdenticalReplyPostRule ¶
func IdenticalReplyPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
Looks for accounts posting the exact same text multiple times. Does not currently count the number of distinct accounts replied to, just counts replies at all.
There can be legitimate situations that trigger this rule, so in most situations should be a "report" not "label" action.
func IdenticalReplyPostSameParentRule ¶
func IdenticalReplyPostSameParentRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func InteractionChurnRule ¶
func InteractionChurnRule(c *automod.RecordContext) error
looks for accounts which do frequent interaction churn, such as follow-unfollow.
func MisleadingLinkUnicodeReversalPostRule ¶
func MisleadingLinkUnicodeReversalPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func MisleadingMentionPostRule ¶
func MisleadingMentionPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func MisleadingURLPostRule ¶
func MisleadingURLPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func NewAccountBotEmailRule ¶
func NewAccountBotEmailRule(c *automod.AccountContext) error
func NewAccountRule ¶
func NewAccountRule(c *automod.AccountContext) error
triggers on first identity event for an account (DID)
func NostrSpamPostRule ¶
func NostrSpamPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for new accounts, which frequently post the same type of content
func ReplyCountPostRule ¶
func ReplyCountPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
does not count "self-replies" (direct to self, or in own post thread)
func ReplySingleBadWordPostRule ¶
func ReplySingleBadWordPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for the specific harassment situation of a replay to another user with only a single word
func SimpleBotPostRule ¶
func SimpleBotPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func TooManyHashtagsPostRule ¶
func TooManyHashtagsPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
if a post is "almost all" hashtags, it might be a form of search spam
func TooManyRepostRule ¶
func TooManyRepostRule(c *automod.RecordContext) error
looks for accounts which do frequent reposts
func TrivialSpamPostRule ¶
func TrivialSpamPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error
looks for new accounts, which frequently post the same type of content
func YoungAccountDistinctMentionsRule ¶
func YoungAccountDistinctMentionsRule(c *automod.RecordContext, post *appbsky.FeedPost) error
func YoungAccountDistinctRepliesRule ¶
func YoungAccountDistinctRepliesRule(c *automod.RecordContext, post *appbsky.FeedPost) error
Types ¶
This section is empty.