[fix] Also match domain when matching message id using In-Reply-To
This commit is contained in:
parent
6aae191158
commit
ef75a1b488
1 changed files with 4 additions and 2 deletions
|
|
@ -183,10 +183,11 @@ class EmailAccount(Document):
|
|||
sender_field = None
|
||||
|
||||
if in_reply_to:
|
||||
if "@" in in_reply_to:
|
||||
if "@{0}".format(frappe.local.site) in in_reply_to:
|
||||
|
||||
# reply to a communication sent from the system
|
||||
in_reply_to = in_reply_to.split("@", 1)[0]
|
||||
in_reply_to, domain = in_reply_to.split("@", 1)
|
||||
|
||||
if frappe.db.exists("Communication", in_reply_to):
|
||||
parent = frappe.get_doc("Communication", in_reply_to)
|
||||
|
||||
|
|
@ -242,6 +243,7 @@ class EmailAccount(Document):
|
|||
else:
|
||||
parent = None
|
||||
|
||||
# NOTE if parent isn't found and there's no subject match, it is likely that it is a new conversation thread and hence is_first = True
|
||||
communication.is_first = True
|
||||
|
||||
if parent:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue