diff roundup/mailgw.py @ 3645:ff32acc965da

match incoming mail In-Reply-To against existing messages... ...when no issue id is specified in the Subject
author Richard Jones <richard@users.sourceforge.net>
date Thu, 03 Aug 2006 00:50:06 +0000
parents 1113e1456093
children 35811df7c783
line wrap: on
line diff
--- a/roundup/mailgw.py	Mon Jul 31 01:30:05 2006 +0000
+++ b/roundup/mailgw.py	Thu Aug 03 00:50:06 2006 +0000
@@ -72,7 +72,7 @@
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception.
 
-$Id: mailgw.py,v 1.175 2006-04-06 06:01:35 a1s Exp $
+$Id: mailgw.py,v 1.176 2006-08-03 00:50:06 richard Exp $
 """
 __docformat__ = 'restructuredtext'
 
@@ -716,6 +716,13 @@
         else:
             nodeid = m.group('nodeid')
 
+        # try in-reply-to to match the message if there's no nodeid
+        inreplyto = message.getheader('in-reply-to') or ''
+        if nodeid is None and inreplyto:
+            l = self.db.getclass('msg').stringFind(inreplyto=inreplyto)
+            if l:
+                nodeid = l[0]
+
         # title is optional too
         title = m.group('title')
         if title:
@@ -930,7 +937,6 @@
         # handle message-id and in-reply-to
         #
         messageid = message.getheader('message-id')
-        inreplyto = message.getheader('in-reply-to') or ''
         # generate a messageid if there isn't one
         if not messageid:
             messageid = "<%s.%s.%s%s@%s>"%(time.time(), random.random(),

Roundup Issue Tracker: http://roundup-tracker.org/