aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Archiver/pipermail.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2010-02-22 17:00:40 -0800
committerMark Sapiro <mark@msapiro.net>2010-02-22 17:00:40 -0800
commiteddab860303c9a970a0428b0cda6561244e450b9 (patch)
tree72741774a58ed7b564e1cb2f2698166f2bf44844 /Mailman/Archiver/pipermail.py
parent1e8dac6da00d176aa6cf10053e5a29c5c26b30f9 (diff)
downloadmailman2-eddab860303c9a970a0428b0cda6561244e450b9.tar.gz
mailman2-eddab860303c9a970a0428b0cda6561244e450b9.tar.xz
mailman2-eddab860303c9a970a0428b0cda6561244e450b9.zip
Additional cleanup of pipermail threading
Diffstat (limited to '')
-rw-r--r--Mailman/Archiver/pipermail.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Archiver/pipermail.py b/Mailman/Archiver/pipermail.py
index 3e5ead66..939602ba 100644
--- a/Mailman/Archiver/pipermail.py
+++ b/Mailman/Archiver/pipermail.py
@@ -651,8 +651,10 @@ class T:
def get_parent_info(self, archive, article):
parentID = None
if article.in_reply_to:
- parentID = article.in_reply_to
- elif article.references:
+ if self.database.hasArticle(archive, article.in_reply_to):
+ # Only use In-Reply-To if it's in the archive.
+ parentID = article.in_reply_to
+ if not parentID and article.references:
refs = self._remove_external_references(article.references)
if refs:
maxdate = self.database.getArticle(archive, refs[0])
@@ -661,7 +663,7 @@ class T:
if a.date > maxdate.date:
maxdate = a
parentID = maxdate.msgid
- else:
+ if not parentID:
# Get the oldest article with a matching subject, and
# assume this is a follow-up to that article
# But, use the subject that's in the database