summaryrefslogtreecommitdiff
path: root/Mailman/Commands/cmd_confirm.py
diff options
context:
space:
mode:
authorbwarsaw2002-11-21 05:35:18 +0000
committerbwarsaw2002-11-21 05:35:18 +0000
commitbf9d3c45b6b35e799adf5beb66cb69fea97b89ad (patch)
tree14688ecbefb0a6ed530a811d6e74f32c3277e302 /Mailman/Commands/cmd_confirm.py
parent92fa58de9a1fe040d3abe1cefa27898cdc561cee (diff)
downloadmailman-bf9d3c45b6b35e799adf5beb66cb69fea97b89ad.tar.gz
mailman-bf9d3c45b6b35e799adf5beb66cb69fea97b89ad.tar.zst
mailman-bf9d3c45b6b35e799adf5beb66cb69fea97b89ad.zip
Diffstat (limited to 'Mailman/Commands/cmd_confirm.py')
-rw-r--r--Mailman/Commands/cmd_confirm.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/Mailman/Commands/cmd_confirm.py b/Mailman/Commands/cmd_confirm.py
index c2f147f9e..5e4fc701b 100644
--- a/Mailman/Commands/cmd_confirm.py
+++ b/Mailman/Commands/cmd_confirm.py
@@ -22,6 +22,7 @@
from Mailman import mm_cfg
from Mailman import Errors
+from Mailman import Pending
from Mailman.i18n import _
STOP = 1
@@ -63,15 +64,21 @@ Your request has been forwarded to the list moderator for approval."""))
You are not current a member. Have you already unsubscribed or changed
your email address?"""))
else:
- res.results.append(_('Confirmation succeeded'))
- # Consume any other confirmation strings with the same cookie so the
- # user doesn't get a misleading "unprocessed" message.
- match = 'confirm ' + cookie
- unprocessed = []
- for line in res.commands:
- if line.lstrip() == match:
- continue
- unprocessed.append(line)
- res.commands = unprocessed
+ if ((results[0] == Pending.SUBSCRIPTION and mlist.send_welcome_msg)
+ or
+ (results[0] == Pending.UNSUBSCRIPTION and mlist.send_goodbye_msg)):
+ # We don't also need to send a confirmation succeeded message
+ res.respond = 0
+ else:
+ res.results.append(_('Confirmation succeeded'))
+ # Consume any other confirmation strings with the same cookie so
+ # the user doesn't get a misleading "unprocessed" message.
+ match = 'confirm ' + cookie
+ unprocessed = []
+ for line in res.commands:
+ if line.lstrip() == match:
+ continue
+ unprocessed.append(line)
+ res.commands = unprocessed
# Process just one confirmation string per message
return STOP