summaryrefslogtreecommitdiff
path: root/src/mailman/rules/moderation.py
diff options
context:
space:
mode:
authorBarry Warsaw2015-05-11 21:29:18 -0400
committerBarry Warsaw2015-05-11 21:29:18 -0400
commite8514abd591504f70c131d08ec9fd2a53c914e9e (patch)
tree6cc26448b1cd1fb638df7a7d6d7528aec90d2161 /src/mailman/rules/moderation.py
parentd6e93bd29f06f0b4d73e455c0170ee1616a17e21 (diff)
downloadmailman-e8514abd591504f70c131d08ec9fd2a53c914e9e.tar.gz
mailman-e8514abd591504f70c131d08ec9fd2a53c914e9e.tar.zst
mailman-e8514abd591504f70c131d08ec9fd2a53c914e9e.zip
Diffstat (limited to 'src/mailman/rules/moderation.py')
-rw-r--r--src/mailman/rules/moderation.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mailman/rules/moderation.py b/src/mailman/rules/moderation.py
index d591557c4..0cc0b81c3 100644
--- a/src/mailman/rules/moderation.py
+++ b/src/mailman/rules/moderation.py
@@ -55,6 +55,9 @@ class MemberModeration:
# stored in the pending request table.
msgdata['moderation_action'] = action.name
msgdata['moderation_sender'] = sender
+ msgdata.setdefault('moderation_reasons', []).append(
+ # This will get translated at the point of use.
+ 'The message comes from a moderated member')
return True
# The sender is not a member so this rule does not match.
return False
@@ -100,6 +103,9 @@ class NonmemberModeration:
# stored in the pending request table.
msgdata['moderation_action'] = action.name
msgdata['moderation_sender'] = sender
+ msgdata.setdefault('moderation_reasons', []).append(
+ # This will get translated at the point of use.
+ 'The message is not from a list member')
return True
# The sender must be a member, so this rule does not match.
return False