fix: Do not relay email to standard users

Co-authored-by: Ritwik Puri <ritwikpuri5678@gmail.com>
This commit is contained in:
Suraj Shetty 2022-07-14 18:01:47 +05:30
parent 572d9cc696
commit 0a41c4051c

View file

@ -73,7 +73,8 @@ class CommunicationEmailMixin:
if include_sender:
cc.append(self.sender_mailid)
if is_inbound_mail_communcation:
cc.append(self.get_owner())
if (doc_owner := self.get_owner()) not in frappe.STANDARD_USERS:
cc.append(doc_owner)
cc = set(cc) - {self.sender_mailid}
cc.update(self.get_assignees())