Merge pull request #166 from mpietsch/master

Changed regex for email subjects to use queue slug to tell internal ticket id from external ones.
This commit is contained in:
Ross Poulton 2013-02-27 14:36:12 -08:00
commit d7a769fa1d

View File

@ -172,7 +172,7 @@ def ticket_from_message(message, queue, quiet):
return False
return True
matchobj = re.match(r"^\[(?P<queue>[-A-Za-z0-9]+)-(?P<id>\d+)\]", subject)
matchobj = re.match(r".*\["+queue.slug+"-(?P<id>\d+)\]", subject)
if matchobj:
# This is a reply or forward.
ticket = matchobj.group('id')