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/09/07 04:06:39 UTC

[incubator-ponymail-foal] branch master updated: switch to using direct document ID for sources

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 cf3d9dd  switch to using direct document ID for sources
cf3d9dd is described below

commit cf3d9dd2a077f74cc4096891b1ff58420ccc96bd
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Mon Sep 6 23:06:34 2021 -0500

    switch to using direct document ID for sources
    
    fall back to mid if no dbid (old imports)
---
 server/endpoints/mbox.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/endpoints/mbox.py b/server/endpoints/mbox.py
index cd584ab..bcbd871 100644
--- a/server/endpoints/mbox.py
+++ b/server/endpoints/mbox.py
@@ -40,7 +40,7 @@ async def process(
 
     sources = []
     for email in results:
-        source = await plugins.messages.get_source(session, permalink=email["mid"])
+        source = await plugins.messages.get_source(session, permalink=email.get("dbid", email["mid"]))
         if source:
             stext = source["_source"]["source"]
             # Convert to mboxrd format