From c08892e55d6ccf4b5759308835c0a4eda29c5213 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Fri, 12 Apr 2024 15:46:14 +0200 Subject: fix json and raw formating for read --- src/jwebmail/model/read_mails.py | 5 ++--- src/jwebmail/render_mail.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/jwebmail') diff --git a/src/jwebmail/model/read_mails.py b/src/jwebmail/model/read_mails.py index e35299f..769589f 100644 --- a/src/jwebmail/model/read_mails.py +++ b/src/jwebmail/model/read_mails.py @@ -69,7 +69,6 @@ class QMailAuthuser: "unread_mails": r.unread_count, } - # def show(self, folder, msgid): req = pb2.ShowReq(folder=folder, mid=msgid) resp = self.build_and_run("read", req.SerializeToString()) @@ -136,8 +135,8 @@ class QMailAuthuser: "reply_to": [cls._address(x) for x in h.reply_to if x], "to": [cls._address(x) for x in h.send_to if x], "subject": h.subject, - "comments": h.comments, - "keywords": h.keywords, + "comments": list(h.comments), + "keywords": list(h.keywords), "mime": cls._mime_header(h.mime), } diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index d348721..bbac94b 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -122,7 +122,7 @@ def render_message(subtype, msg, path): R += _format_header(gettext("CC"), msg["head"].get("cc")) R += _format_header(gettext("BCC"), msg["head"].get("bcc")) R += f"
{escape(gettext('Date'))}
" - date = escape(msg['head']['date']) + date = escape(msg["head"]["date"]) R += f"
\n" R += f"
{escape(gettext('Content-Type'))}
" R += f"
{to_mime_type(msg['head']['mime'])}
\n" -- cgit v1.2.3