You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/11/15 17:45:51 UTC
[incubator-ponymail-foal] 01/07: allow finding parent emails
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 9a00f2560851d99496b70f6ac1f99ef665565569
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Nov 15 18:30:42 2021 +0100
allow finding parent emails
---
server/endpoints/thread.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/server/endpoints/thread.py b/server/endpoints/thread.py
index 3e28123..e0ad54e 100644
--- a/server/endpoints/thread.py
+++ b/server/endpoints/thread.py
@@ -31,6 +31,10 @@ async def process(
if not email:
mailid = mailid.replace(" ", "+") # Some Message-IDs have + in them, this can confuse since + means space.
email = await plugins.messages.get_email(session, messageid=mailid)
+ if indata.get("find_parent"):
+ parent = await plugins.messages.find_parent(session, email)
+ if parent:
+ email = parent
if email and isinstance(email, dict):
thread, emails, pdocs = await plugins.messages.fetch_children(session, email, short=True)
else: