summaryrefslogtreecommitdiff
path: root/addons/mail/mail_thread.py
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-08-01 13:06:49 +0200
committerOlivier Dony <odo@openerp.com>2014-08-01 13:06:49 +0200
commitee4df1e397a7f1ada09f53c3b72d9dddfa9b3e22 (patch)
tree438b018b377a0c94be1d19e4c3928974b9d18f08 /addons/mail/mail_thread.py
parent5ddc0305cd0bef77632ee50fb19ae7372ae5cb68 (diff)
parent8b15482e0037b2484e993ffaf9e5691662c99e28 (diff)
[MERGE] Forward-port saas-4 up to 8b15482
Diffstat (limited to 'addons/mail/mail_thread.py')
-rw-r--r--addons/mail/mail_thread.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py
index d04221cd0f5..23c3255500c 100644
--- a/addons/mail/mail_thread.py
+++ b/addons/mail/mail_thread.py
@@ -906,7 +906,7 @@ class mail_thread(osv.AbstractModel):
# 1. message is a reply to an existing message (exact match of message_id)
ref_match = thread_references and tools.reference_re.search(thread_references)
- msg_references = thread_references.split()
+ msg_references = mail_header_msgid_re.findall(thread_references)
mail_message_ids = mail_msg_obj.search(cr, uid, [('message_id', 'in', msg_references)], context=context)
if ref_match and mail_message_ids:
original_msg = mail_msg_obj.browse(cr, SUPERUSER_ID, mail_message_ids[0], context=context)
@@ -949,7 +949,7 @@ class mail_thread(osv.AbstractModel):
email_from, email_to, message_id, model, thread_id, custom_values, uid)
return [route]
- # 2. Reply to a private message
+ # 3. Reply to a private message
if in_reply_to:
mail_message_ids = mail_msg_obj.search(cr, uid, [
('message_id', '=', in_reply_to),
@@ -966,7 +966,7 @@ class mail_thread(osv.AbstractModel):
email_from, email_to, message_id, mail_message.id, custom_values, uid)
return [route]
- # 3. Look for a matching mail.alias entry
+ # 4. Look for a matching mail.alias entry
# Delivered-To is a safe bet in most modern MTAs, but we have to fallback on To + Cc values
# for all the odd MTAs out there, as there is no standard header for the envelope's `rcpt_to` value.
rcpt_tos = \
@@ -1001,7 +1001,7 @@ class mail_thread(osv.AbstractModel):
routes.append(route)
return routes
- # 4. Fallback to the provided parameters, if they work
+ # 5. Fallback to the provided parameters, if they work
if not thread_id:
# Legacy: fallback to matching [ID] in the Subject
match = tools.res_re.search(decode_header(message, 'Subject'))