Skip to content

Commit d4a041c

Browse files
author
Richard Jones
committed
match incoming mail In-Reply-To against existing messages...
...when no issue id is specified in the Subject
1 parent e94a06d commit d4a041c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ are given with the most recent entry first.
55
Feature:
66
- full timezone support (sf patch 1465296)
77
- handle connection loss when responding to web requests
8+
- match incoming mail In-Reply-To against existing messages when no issue
9+
id is specified in the Subject
810
- added StringHTMLProperty wrapped() method to wrap long lines in issue
911
display
1012

roundup/mailgw.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272
an exception, the original message is bounced back to the sender with the
7373
explanatory message given in the exception.
7474
75-
$Id: mailgw.py,v 1.175 2006-04-06 06:01:35 a1s Exp $
75+
$Id: mailgw.py,v 1.176 2006-08-03 00:50:06 richard Exp $
7676
"""
7777
__docformat__ = 'restructuredtext'
7878

@@ -716,6 +716,13 @@ def handle_message(self, message):
716716
else:
717717
nodeid = m.group('nodeid')
718718

719+
# try in-reply-to to match the message if there's no nodeid
720+
inreplyto = message.getheader('in-reply-to') or ''
721+
if nodeid is None and inreplyto:
722+
l = self.db.getclass('msg').stringFind(inreplyto=inreplyto)
723+
if l:
724+
nodeid = l[0]
725+
719726
# title is optional too
720727
title = m.group('title')
721728
if title:
@@ -930,7 +937,6 @@ def handle_message(self, message):
930937
# handle message-id and in-reply-to
931938
#
932939
messageid = message.getheader('message-id')
933-
inreplyto = message.getheader('in-reply-to') or ''
934940
# generate a messageid if there isn't one
935941
if not messageid:
936942
messageid = "<%s.%s.%s%s@%s>"%(time.time(), random.random(),

0 commit comments

Comments
 (0)