Fix regarding support ticket to support ticket system email chaining issue

This commit is contained in:
Anand Doshi 2012-01-05 13:52:56 +05:30
parent 91e40c6d9b
commit f2fb3a4abf

View file

@ -66,9 +66,11 @@ class IncomingMail:
Extracts thread id of the message between first []
from the subject
"""
import re
subject = self.mail.get('Subject', '')
if '[' in subject and ']' in subject:
return subject.split('[')[1].split(']')[0]
return re.findall('(?<=\[)\w+', subject)
def process_part(self, part):
"""