From 03d059dd26e27077de6c58847926cfe9d2e6590b Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 1 Nov 2017 11:08:19 -0700 Subject: [PATCH] Don't include resigned reviewers in the Differential "To" list Summary: Ref T12689. See PHI178. This isn't a complete solution (you may still get mailed via packages/projects) but should fix the obvious issue, where "Resigned" reviewers are incorrectly always sent mail directly. Test Plan: Had Alice resign, interacted as Bailey, no mail to Alice. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T12689 Differential Revision: https://secure.phabricator.com/D18758 --- .../differential/editor/DifferentialTransactionEditor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 3e6cca1edb..26c440e866 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -630,6 +630,10 @@ final class DifferentialTransactionEditor $phids = array(); $phids[] = $object->getAuthorPHID(); foreach ($object->getReviewers() as $reviewer) { + if ($reviewer->isResigned()) { + continue; + } + $phids[] = $reviewer->getReviewerPHID(); } return $phids;