Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core
Commits: 4db9859b by Mark Sapiro at 2020-09-17T20:08:58-07:00 Move the Message: n header to the top in the plain digest. - - - - - 3338ba65 by Mark Sapiro at 2020-09-18T03:48:46+00:00 Merge branch 'digest' into 'master' Move the Message: n header to the top in the plain digest. See merge request mailman/mailman!704 - - - - - 2 changed files: - src/mailman/runners/digest.py - src/mailman/runners/docs/digester.rst Changes: ===================================== src/mailman/runners/digest.py ===================================== @@ -177,6 +177,9 @@ class MIMEDigester(Digester): # scrubs out attachments. digest_msg = MIMEMessage(deepcopy(msg)) digest_msg_content = digest_msg.get_payload(0) + # It would be nice to add Message: n near the beginning, but there's no + # method for that. MUAs mostly don't display it anyway, so it doesn't + # really matter. digest_msg_content['Message'] = str(count) self._digest_part.attach(digest_msg) @@ -235,14 +238,15 @@ class RFC1153Digester(Digester): print(self._separator30, file=self._text) print(file=self._text) # Each message section contains a few headers. + # add the Message: n header first. + print('Message: {}'.format(count), file=self._text) + # Then the others. for header in config.digests.plain_digest_keep_headers.split(): if header in msg: value = oneline(msg[header], in_unicode=True) value = wrap('{}: {}'.format(header, value)) value = '\n\t'.join(value.split('\n')) print(value, file=self._text) - # add the Message: header. - print('Message: {}'.format(count), file=self._text) print(file=self._text) # Add the payload. If the decoded payload is empty, this may be a # multipart message. In that case, just stringify it. ===================================== src/mailman/runners/docs/digester.rst ===================================== @@ -269,37 +269,37 @@ The RFC 1153 contains the digest in a single plain text message. <BLANKLINE> ---------------------------------------------------------------------- <BLANKLINE> + Message: 1 From: aper...@example.com Subject: Test message 1 To: xt...@example.com - Message: 1 <BLANKLINE> Here is message 1 <BLANKLINE> ------------------------------ <BLANKLINE> + Message: 2 From: aper...@example.com Subject: Test message 2 To: xt...@example.com - Message: 2 <BLANKLINE> Here is message 2 <BLANKLINE> ------------------------------ <BLANKLINE> + Message: 3 From: aper...@example.com Subject: Test message 3 To: xt...@example.com - Message: 3 <BLANKLINE> Here is message 3 <BLANKLINE> ------------------------------ <BLANKLINE> + Message: 4 From: aper...@example.com Subject: Test message 4 To: xt...@example.com - Message: 4 <BLANKLINE> Here is message 4 <BLANKLINE> View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/f667f608d0dcee5374a7ae7ee1b57ed5f5a4be33...3338ba6598e218c9894dd4eae8b27388ba38c9b4 -- View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/f667f608d0dcee5374a7ae7ee1b57ed5f5a4be33...3338ba6598e218c9894dd4eae8b27388ba38c9b4 You're receiving this email because of your account on gitlab.com.
_______________________________________________ Mailman-checkins mailing list -- mailman-checkins@python.org To unsubscribe send an email to mailman-checkins-le...@python.org https://mail.python.org/mailman3/lists/mailman-checkins.python.org/ Member address: arch...@jab.org