diff options
| author | Barry Warsaw | 2009-02-09 22:19:18 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-02-09 22:19:18 -0500 |
| commit | 98c52ea14883f0261fd7a2f2fe8db42d96331ddb (patch) | |
| tree | a0c5817f4c226ed14b3fe510314e825980b6cb4e /src/mailman/app/moderator.py | |
| parent | 84a81e4a90349f7116863d2f45cda1ee31b5b3b5 (diff) | |
| download | mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.tar.gz mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.tar.zst mailman-98c52ea14883f0261fd7a2f2fe8db42d96331ddb.zip | |
Diffstat (limited to 'src/mailman/app/moderator.py')
| -rw-r--r-- | src/mailman/app/moderator.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mailman/app/moderator.py b/src/mailman/app/moderator.py index b40a34344..1f66e00ac 100644 --- a/src/mailman/app/moderator.py +++ b/src/mailman/app/moderator.py @@ -17,7 +17,7 @@ """Application support for moderators.""" -from __future__ import unicode_literals +from __future__ import absolute_import, unicode_literals __metaclass__ = type __all__ = [ @@ -34,7 +34,6 @@ import logging from datetime import datetime from email.utils import formataddr, formatdate, getaddresses, make_msgid -from mailman import Message from mailman import Utils from mailman import i18n from mailman.app.membership import add_member, delete_member @@ -42,10 +41,12 @@ from mailman.app.notifications import ( send_admin_subscription_notice, send_welcome_message) from mailman.config import config from mailman.core import errors +from mailman.email.message import Message, UserNotification from mailman.interfaces import Action from mailman.interfaces.member import AlreadySubscribedError, DeliveryMode from mailman.interfaces.requests import RequestType + _ = i18n._ vlog = logging.getLogger('mailman.vette') @@ -87,7 +88,7 @@ def hold_message(mlist, msg, msgdata=None, reason=None): # the moderation interface. msgdata['_mod_message_id'] = message_id msgdata['_mod_fqdn_listname'] = mlist.fqdn_listname - msgdata['_mod_sender'] = msg.get_sender() + msgdata['_mod_sender'] = msg.sender msgdata['_mod_subject'] = msg.get('subject', _('(no subject)')) msgdata['_mod_reason'] = reason msgdata['_mod_hold_date'] = datetime.now().isoformat() @@ -165,7 +166,7 @@ def handle_message(mlist, id, action, if member: language = member.preferred_language with i18n.using_language(language): - fmsg = Message.UserNotification( + fmsg = UserNotification( addresses, mlist.bounces_address, _('Forward of moderated message'), lang=language) @@ -212,7 +213,7 @@ def hold_subscription(mlist, address, realname, password, mode, language): }, mlist=mlist) # This message should appear to come from the <list>-owner so as # to avoid any useless bounce processing. - msg = Message.UserNotification( + msg = UserNotification( mlist.owner_address, mlist.owner_address, subject, text, mlist.preferred_language) msg.send(mlist, tomoderators=True) @@ -284,7 +285,7 @@ def hold_unsubscription(mlist, address): }, mlist=mlist) # This message should appear to come from the <list>-owner so as # to avoid any useless bounce processing. - msg = Message.UserNotification( + msg = UserNotification( mlist.owner_address, mlist.owner_address, subject, text, mlist.preferred_language) msg.send(mlist, tomoderators=True) @@ -346,6 +347,5 @@ def _refuse(mlist, request, recip, comment, origmsg=None, lang=None): str(origmsg) ]) subject = _('Request to mailing list "$realname" rejected') - msg = Message.UserNotification(recip, mlist.bounces_address, - subject, text, lang) + msg = UserNotification(recip, mlist.bounces_address, subject, text, lang) msg.send(mlist) |
