···99 "github.com/bluesky-social/indigo/automod/countstore"
1010)
11111212-var _ automod.IdentityRuleFunc = NewAccountRule
1313-1412// triggers on first identity event for an account (DID)
1513func NewAccountRule(c *automod.AccountContext) error {
1614 // need access to IndexedAt for this rule
···4745 }
4846 return nil
4947}
4848+4949+var _ automod.IdentityRuleFunc = NewAccountRule
5050+5151+func CelebSpamIdentityRule(c *automod.AccountContext) error {
5252+5353+ hdl := c.Account.Identity.Handle.String()
5454+ if strings.Contains(hdl, "elon") && strings.Contains(hdl, "musk") {
5555+ c.AddAccountFlag("handle-elon-musk")
5656+ c.ReportAccount(automod.ReportReasonSpam, "possible Elon Musk impersonator")
5757+ return nil
5858+ }
5959+6060+ return nil
6161+}
6262+6363+var _ automod.IdentityRuleFunc = CelebSpamIdentityRule
+1-1
automod/rules/interaction.go
···4040 }
4141 // just generic bulk following
4242 followRatio := float64(c.Account.FollowersCount) / float64(c.Account.FollowsCount)
4343- if created > interactionDailyThreshold && c.Account.FollowsCount > 2000 && followRatio < 0.1 {
4343+ if created > interactionDailyThreshold && c.Account.FollowsCount > 2000 && followRatio < 0.2 {
4444 c.Logger.Info("bulk-follower", "created-today", created)
4545 c.AddAccountFlag("bulk-follower")
4646 c.ReportAccount(automod.ReportReasonSpam, fmt.Sprintf("bulk following: %d follows today (so far)", created))
+12-1
automod/rules/keyword.go
···1111)
12121313func BadWordPostRule(c *automod.RecordContext, post *appbsky.FeedPost) error {
1414+ isJapanese := false
1515+ for _, lang := range post.Langs {
1616+ if lang == "ja" || strings.HasPrefix(lang, "ja-") {
1717+ isJapanese = true
1818+ }
1919+ }
1420 for _, tok := range ExtractTextTokensPost(post) {
1521 word := keyword.SlugIsExplicitSlur(tok)
1622 // used very frequently in a reclaimed context
1717- if word != "" && word != "faggot" && word != "tranny" {
2323+ if word != "" && word != "faggot" && word != "tranny" && word != "coon" && !(word == "kike" && isJapanese) {
1824 c.AddRecordFlag("bad-word-text")
1925 c.ReportRecord(automod.ReportReasonRude, fmt.Sprintf("possible bad word in post text or alttext: %s", word))
2026 //c.Notify("slack")
···2329 // de-pluralize
2430 tok = strings.TrimSuffix(tok, "s")
2531 if c.InSet("worst-words", tok) {
3232+ // skip this specific term, if used in a Japanese language post
3333+ if isJapanese && tok == "kike" {
3434+ continue
3535+ }
3636+2637 c.AddRecordFlag("bad-word-text")
2738 c.ReportRecord(automod.ReportReasonRude, fmt.Sprintf("possible bad word in post text or alttext: %s", tok))
2839 //c.Notify("slack")