Allow "send me an email" in personal rules to punch through settings

Summary:
Fixes T7731. When a user writes a "Send me an email" rule, always try send them an email, even if their notification settings would normally downgrade it to a notification.

In particular, this is stronger than these downgrades:

  - Downgrades due to "self actions";
  - downgrades due to "mail tags".

Test Plan:
  - Wrote various Herald rules with "Send me an email" rules.
  - Used `bin/mail list-outbound` / `show-outbound` to vet generated mail.
  - Mail reacted properly to a variety of conditions (disabled accounts, settings, "send me an email" rule, forced delivery).

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7731

Differential Revision: https://secure.phabricator.com/D12300
This commit is contained in:
epriestley
2015-04-06 10:01:32 -07:00
parent c0e26c65e0
commit b16db61a87
8 changed files with 83 additions and 66 deletions

View File

@@ -13,7 +13,6 @@ final class PhrictionTransactionEditor
private $skipAncestorCheck;
private $contentVersion;
private $processContentVersionError = true;
private $heraldEmailPHIDs = array();
public function setDescription($description) {
$this->description = $description;
@@ -369,16 +368,6 @@ final class PhrictionTransactionEditor
);
}
protected function getMailCC(PhabricatorLiskDAO $object) {
$phids = array();
foreach ($this->heraldEmailPHIDs as $phid) {
$phids[] = $phid;
}
return $phids;
}
public function getMailTagsMap() {
return array(
PhrictionTransaction::MAILTAG_TITLE =>
@@ -801,8 +790,6 @@ final class PhrictionTransactionEditor
->setNewValue(array('+' => $value));
}
$this->heraldEmailPHIDs = $adapter->getEmailPHIDs();
return $xactions;
}