From e7ead98e5aaf294b2c498925bdc3dc9b63fdc980 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 17 Nov 2024 14:02:42 +0100 Subject: fix rendering mails in sub folders --- src/jwebmail/__init__.py | 2 +- src/jwebmail/render_mail.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/jwebmail') diff --git a/src/jwebmail/__init__.py b/src/jwebmail/__init__.py index fe32430..01cb70b 100644 --- a/src/jwebmail/__init__.py +++ b/src/jwebmail/__init__.py @@ -36,7 +36,7 @@ else: toml_read_file = dict(load=toml_load, text=True) -__version__ = "2.6.0.dev2" +__version__ = "2.6.0.dev3" csrf = CSRFProtect() diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index bbac94b..eec6e30 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -11,12 +11,18 @@ def render_text_html(_subtype, _content, path): if path: url = url_for( "read", + folder=request.view_args["folder"], msgid=request.view_args["msgid"], format="raw", path=".".join(map(str, path)), ) else: - url = url_for("read", msgid=request.view_args["msgid"], format="raw") + url = url_for( + "read", + folder=request.view_args["folder"], + msgid=request.view_args["msgid"], + format="raw", + ) return f'\n' @@ -72,6 +78,7 @@ def render_multipart(_subtype, content, path): ref_url = url_for( "read", + folder=request.view_args["folder"], msgid=request.view_args["msgid"], path=".".join(map(str, [*path, i])), format="raw", -- cgit v1.2.3