Skip to content

Commit

Permalink
reply rule: check for nil private account meta
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Dec 19, 2023
1 parent 65c408e commit 129e97e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions automod/rules/replies.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ func IdenticalReplyPostRule(evt *automod.RecordEvent, post *appbsky.FeedPost) er
if utf8.RuneCountInString(post.Text) <= 10 {
return nil
}
age := time.Since(evt.Account.Private.IndexedAt)
if age > 2*7*24*time.Hour {
return nil
if evt.Account.Private != nil {
age := time.Since(evt.Account.Private.IndexedAt)
if age > 2*7*24*time.Hour {
return nil
}
}

if evt.GetCount("reply-text", bucket, period) >= identicalReplyLimit {
Expand Down

0 comments on commit 129e97e

Please sign in to comment.