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/12/29 16:53:10 UTC
[incubator-ponymail-foal] branch master updated: Add in list ID argument to be used if present
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
The following commit(s) were added to refs/heads/master by this push:
new 076c2ad Add in list ID argument to be used if present
076c2ad is described below
commit 076c2ad63d71e8be3900a1dde111a5023bbc68e9
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Wed Dec 29 17:51:03 2021 +0100
Add in list ID argument to be used if present
---
server/endpoints/thread.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/server/endpoints/thread.py b/server/endpoints/thread.py
index 9ef79ce..b8dbe94 100644
--- a/server/endpoints/thread.py
+++ b/server/endpoints/thread.py
@@ -27,15 +27,16 @@ async def process(
server: plugins.server.BaseServer, session: plugins.session.SessionObject, indata: dict,
) -> typing.Optional[dict]:
mailid = indata.get("id", "")
+ listid = indata.get("list", "")
email = await plugins.messages.get_email(session, permalink=mailid)
if not email:
- email = await plugins.messages.get_email(session, messageid=mailid)
+ email = await plugins.messages.get_email(session, messageid=mailid, listid=listid)
# The id is passed via the path thread/id
# This means that + is converted into space
# So we need to try both space and '+', and hope no msg ids contain both
if not email and ' ' in mailid: # only try again if we need to
mailid = mailid.replace(" ", "+")
- email = await plugins.messages.get_email(session, messageid=mailid)
+ email = await plugins.messages.get_email(session, messageid=mailid, listid=listid)
if not email:
return None
if indata.get("find_parent"):