Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits:
5a366a59 by Mark Sapiro at 2021-02-18T15:06:10-08:00
RFC 2047 decode Subject: for mailman notify command.
- - - - -
f768dd30 by Mark Sapiro at 2021-02-18T23:54:13+00:00
Merge branch 'notice' into 'master'
RFC 2047 decode Subject: for mailman notify command.
Closes #831
See merge request mailman/mailman!784
- - - - -
3 changed files:
- src/mailman/commands/cli_notify.py
- src/mailman/commands/tests/test_cli_notify.py
- src/mailman/docs/NEWS.rst
Changes:
=====================================
src/mailman/commands/cli_notify.py
=====================================
@@ -20,6 +20,7 @@
import sys
import click
+from email.header import decode_header, make_header
from mailman.core.i18n import _
from mailman.email.message import OwnerNotification
from mailman.interfaces.command import ICLISubCommand
@@ -120,7 +121,8 @@ def _build_detail(requestdb, subs, unsubs):
subject = data['_mod_subject']
reason = data['_mod_reason']
detail += ' ' + _('Sender: {}\n').format(sender)
- detail += ' ' + _('Subject: {}\n').format(subject)
+ detail += ' ' + _('Subject: {}\n').format(
+ str(make_header(decode_header(subject))))
detail += ' ' + _('Reason: {}\n\n').format(reason)
return detail
=====================================
src/mailman/commands/tests/test_cli_notify.py
=====================================
@@ -52,7 +52,7 @@ Subject: message 1
msg2 = mfs("""\
To: [email protected]
From: [email protected]
-Subject: message 2
+Subject: =?utf-8?q?message_2?=
""")
hold_message(self._mlist, msg2, {}, 'Some other reason')
=====================================
src/mailman/docs/NEWS.rst
=====================================
@@ -15,11 +15,15 @@ Here is a history of user visible changes to Mailman.
(2021-XX-XX)
+Command line
+------------
+* The ``notify`` subcommand will now decode an RFC 2047 encoded Subject: for
+ the report of held messages. (Closes #831)
+
REST
----
* Improve the speed of Members lookup via REST API. (Related to #700)
-
Other
-----
* Reduce the number of database calls in UserManager. (Closes #700)
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/5203e21a950482f8f45209ee2bd2c2f35166c275...f768dd300d0eb370a198fc3123e57a4e0ae0b298
--
View it on GitLab:
https://gitlab.com/mailman/mailman/-/compare/5203e21a950482f8f45209ee2bd2c2f35166c275...f768dd300d0eb370a198fc3123e57a4e0ae0b298
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/mailman-checkins.python.org/
Member address: [email protected]