-
-
Notifications
You must be signed in to change notification settings - Fork 714
Remove pings when auto-banning in filters #3306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
bot/exts/filtering/filtering.py
Outdated
# If the action is a ban, mods don't want to be pinged. | ||
if infr_action := result_actions.get("infraction_and_notification"): | ||
if infr_action.infraction_type == Infraction.BAN: | ||
del result_actions["mentions"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there are no mentions?
del result_actions["mentions"] | |
result_actions.pop("mentions", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
Mods no longer want to be pinged when a fitler results in an auto ban, but we still want the message to be sent to mod-alerts.
de418f6
to
72e8fe9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Mods no longer want to be pinged when a fitler results in an auto ban, but we still want the message to be sent to mod-alerts.