This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 194c0c5e5d22a57455282739e01914ea953bb5c6
Author: Daniel Gruno <[email protected]>
AuthorDate: Mon Mar 29 17:05:20 2021 +0200

    don't show source for modified emails
    
    We probably don't want to show what we edited, so...yeah.
---
 server/endpoints/source.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/endpoints/source.py b/server/endpoints/source.py
index 60fa085..f68bdb9 100644
--- a/server/endpoints/source.py
+++ b/server/endpoints/source.py
@@ -37,7 +37,7 @@ async def process(
     if email and isinstance(email, dict) and not email.get("deleted"):
         if plugins.aaa.can_access_email(session, email):
             source = await plugins.mbox.get_source(session, 
permalink=email["mid"])
-            if source:
+            if source and not source.get("deleted"):
                 return aiohttp.web.Response(
                     headers={"Content-Type": "text/plain"}, status=200, 
text=source["_source"]["source"],
                 )

Reply via email to