Skip to content

Commit

Permalink
policylist: don't apply hacky filter to unban recommendation
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 25, 2024
1 parent 9b6ffb5 commit 3488431
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions policylist/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,11 @@ func updatePolicyList(evt *event.Event, entityType EntityType, rules *List) (add
Timestamp: evt.Timestamp,
ID: evt.ID,
}
for _, entry := range HackyRuleFilter {
if added.Pattern.Match(entry) {
added.Ignored = true
if added.Recommendation == event.PolicyRecommendationBan {
for _, entry := range HackyRuleFilter {
if added.Pattern.Match(entry) {
added.Ignored = true
}
}
}
var wasAdded bool
Expand Down

0 comments on commit 3488431

Please sign in to comment.