diff options
| author | bwarsaw | 2001-07-30 23:24:21 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-07-30 23:24:21 +0000 |
| commit | 508619bb481959e3ac1b4352d3f78f01d34457ed (patch) | |
| tree | 1992d8e97e25fbe56b34d7791be414d2b81d86f0 /Mailman/Handlers/Hold.py | |
| parent | 621e60ed9b2f78149bd1888a0fa60eb6f34b3af8 (diff) | |
| download | mailman-508619bb481959e3ac1b4352d3f78f01d34457ed.tar.gz mailman-508619bb481959e3ac1b4352d3f78f01d34457ed.tar.zst mailman-508619bb481959e3ac1b4352d3f78f01d34457ed.zip | |
Diffstat (limited to 'Mailman/Handlers/Hold.py')
| -rw-r--r-- | Mailman/Handlers/Hold.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index f831325a3..d292e0af8 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -38,6 +38,7 @@ from Mailman import Utils from Mailman import Errors from Mailman import Message from Mailman import i18n +from Mailman import Pending from Mailman.Logging.Syslog import syslog # First, play footsie with _ so that the following are marked as translated, @@ -229,7 +230,7 @@ def hold_for_approval(mlist, msg, msgdata, exc): # translator again, because of the games we play above reason = _(str(exc)) msgdata['rejection-notice'] = _(exc.rejection_notice(mlist)) - mlist.HoldMessage(msg, reason, msgdata) + id = mlist.HoldMessage(msg, reason, msgdata) # Now we need to craft and send a message to the list admin so they can # deal with the held message. d = {'listname' : listname, @@ -249,6 +250,10 @@ def hold_for_approval(mlist, msg, msgdata, exc): # This message should appear to come from <list>-admin so as to handle any # bounce processing that might be needed. if not fromusenet and not mlist.dont_respond_to_post_requests: + # Get a confirmation cookie + cookie = Pending.new(Pending.HELD_MESSAGE, id) + d['confirmurl'] = '%s/%s' % (mlist.GetScriptURL('confirm', absolute=1), + cookie) lang = msgdata.get('lang', mlist.getMemberLanguage(sender)) subject = _('Your message to %(listname)s awaits moderator approval') text = Utils.maketext('postheld.txt', d, lang=lang, mlist=mlist) |
