From deba531401f75d1d489bc4b68635a459fae0a6af Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 31 Mar 2014 07:52:51 -0700 Subject: [PATCH] Send mail to audit comment author too Summary: Previously, you would not receive a mail message for the first comment you make on an audit, but you would for subsequent comments because everyone who's made a comment would be CCed on the email. This mirrors DifferentialTransactionEditor's getMailTo which always adds `$object->getAuthorPHID()`. Test Plan: With self mail turned on, made the first comment on a commit and received an email for it. With self mail turned off, commented on a different commit and saw in `bin/mail list-outbound` that the message was voided. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D8650 --- src/applications/audit/editor/PhabricatorAuditCommentEditor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/audit/editor/PhabricatorAuditCommentEditor.php b/src/applications/audit/editor/PhabricatorAuditCommentEditor.php index ff72c79de3..6633e650a9 100644 --- a/src/applications/audit/editor/PhabricatorAuditCommentEditor.php +++ b/src/applications/audit/editor/PhabricatorAuditCommentEditor.php @@ -429,6 +429,8 @@ final class PhabricatorAuditCommentEditor extends PhabricatorEditor { $email_to = array(); $email_cc = array(); + $email_to[$comment->getActorPHID()] = true; + $author_phid = $data->getCommitDetail('authorPHID'); if ($author_phid) { $email_to[$author_phid] = true;