Skip to content

Commit

Permalink
replies rule: switch to rune counting, and bump count
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Dec 18, 2023
1 parent 39d60b4 commit 014370f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion automod/rules/replies.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package rules

import (
"unicode/utf8"

appbsky "github.com/bluesky-social/indigo/api/bsky"
"github.com/bluesky-social/indigo/atproto/syntax"
"github.com/bluesky-social/indigo/automod"
Expand Down Expand Up @@ -40,7 +42,7 @@ func IdenticalReplyPostRule(evt *automod.RecordEvent, post *appbsky.FeedPost) er
}

// short reply? ignore it
if len(post.Text) <= 8 {
if utf8.RuneCountInString(post.Text) <= 10 {
return nil
}

Expand Down

0 comments on commit 014370f

Please sign in to comment.