Skip to content

Commit

Permalink
automod: fix segfault in harassment rule
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Sep 25, 2024
1 parent 01a47d4 commit 442474a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions automod/rules/harassment.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ func HarassmentTargetInteractionPostRule(c *automod.RecordContext, post *appbsky
if targetAccount == nil {
continue
}
for _, t := range targetAccount.Private.AccountTags {
if t == "harassment-protection" {
targetIsProtected = true
break
if targetAccount.Private != nil {
for _, t := range targetAccount.Private.AccountTags {
if t == "harassment-protection" {
targetIsProtected = true
break
}
}
}
}
Expand Down

0 comments on commit 442474a

Please sign in to comment.