From 410dc24e16b5a9aef0b8e60ec53594c368288a30 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Fri, 8 Dec 2023 14:06:17 +0100 Subject: merge raw and read add json format for read --- src/jwebmail/render_mail.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/jwebmail/render_mail.py') diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index 588959c..f597603 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -10,10 +10,13 @@ def render_text_plain(_subtype, content, _path): def render_text_html(_subtype, _content, path): if path: url = url_for( - "raw", msgid=request.view_args["msgid"], path=".".join(map(str, path)) + "read", + msgid=request.view_args["msgid"], + format="raw", + path=".".join(map(str, path)), ) else: - url = url_for("raw", msgid=request.view_args["msgid"]) + url = url_for("read", msgid=request.view_args["msgid"], format="raw") return f'\n' @@ -69,9 +72,10 @@ def render_multipart(_subtype, content, path): ) ref_url = url_for( - "raw", + "read", msgid=request.view_args["msgid"], path=".".join(map(str, [*path, i])), + format="raw", ) R += "

" -- cgit v1.2.3