diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-12-08 14:06:17 +0100 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-12-08 14:06:17 +0100 |
commit | 410dc24e16b5a9aef0b8e60ec53594c368288a30 (patch) | |
tree | 1fe29ee836a594bd361a3bba4910f87458751626 /src/jwebmail/render_mail.py | |
parent | a00292129478a2b38673fd39cd361c7142166d4d (diff) |
merge raw and read
add json format for read
Diffstat (limited to 'src/jwebmail/render_mail.py')
-rw-r--r-- | src/jwebmail/render_mail.py | 10 |
1 files changed, 7 insertions, 3 deletions
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'<iframe src="{url}" class="jwm-mail-body-text-html" ></iframe>\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 += "<p>" |