Merge pull request #17515 from surajshetty3416/fix-inbound-notification-receivers

fix: Do not relay email to standard users
This commit is contained in:
Suraj Shetty 2022-07-14 18:32:45 +05:30 committed by GitHub
commit bdb36f4c2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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())