about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-21 17:32:43 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-21 17:32:43 +0700
commit31dcce4812a6aac8dc4980c1c4e392477748a70f (patch)
treeaf81ff9bd1460cbbff5fe34efc59fa2e8f1a9a19
parent252a1b9488d7cd22a4b965d47f9e332607ec5b55 (diff)
downloadformbox-31dcce4812a6aac8dc4980c1c4e392477748a70f.tar.gz
Expose the original RFC 822 date 0.4.0
-rw-r--r--pyproject.toml2
-rwxr-xr-xsrc/formbox.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/pyproject.toml b/pyproject.toml
index 5a90ab5..46f20c3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 name = "formbox"
-version = "0.3.0"
+version = "0.4.0"
 description = "Format mbox as HTML/XML"
 readme = "README.md"
 requires-python = ">=3.6"
diff --git a/src/formbox.py b/src/formbox.py
index 2136a0c..0be3093 100755
--- a/src/formbox.py
+++ b/src/formbox.py
@@ -78,9 +78,9 @@ def render(template, archive, parent):
         author = ' '.join(decode(self['From'])).rsplit(maxsplit=1)[0]
         rendered_children = render(template, archive, message_id)
         yield template.format(in_reply_to=quote(parent),
-                              message_id=quote(message_id),
+                              message_id=quote(message_id), author=author,
                               mailto_params=urlencode(dict(reply_to(self))),
-                              date=date(self).isoformat(), author=author,
+                              date=date(self).isoformat(), rfc822=self['Date'],
                               body=body, children='\n'.join(rendered_children))