This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 329896c Try mid before adjusting it; fail fast
329896c is described below
commit 329896c15fe9843b3d9125e91fa0a0cb10a72b10
Author: Sebb <[email protected]>
AuthorDate: Sun Nov 28 11:27:34 2021 +0000
Try mid before adjusting it; fail fast
This seems to help with INFRA-22569
---
server/endpoints/thread.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server/endpoints/thread.py b/server/endpoints/thread.py
index dbcd65b..48e7545 100644
--- a/server/endpoints/thread.py
+++ b/server/endpoints/thread.py
@@ -29,14 +29,18 @@ async def process(
mailid = indata.get("id", "")
email = await plugins.messages.get_email(session, permalink=mailid)
if not email:
+ email = await plugins.messages.get_email(session, messageid=mailid)
+ 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 not email:
+ return None
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)
+ thread, emails, _pdocs = await
plugins.messages.fetch_children(session, email, short=True)
else:
return None