Differential D13897 Diff 33570 src/applications/metamta/herald/PhabricatorMetaMTAEmailHeraldAction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/herald/PhabricatorMetaMTAEmailHeraldAction.php
<?php | <?php | ||||
abstract class PhabricatorMetaMTAEmailHeraldAction | abstract class PhabricatorMetaMTAEmailHeraldAction | ||||
extends HeraldAction { | extends HeraldAction { | ||||
const DO_SEND = 'do.send'; | const DO_SEND = 'do.send'; | ||||
const DO_FORCE = 'do.force'; | const DO_FORCE = 'do.force'; | ||||
public function supportsObject($object) { | public function supportsObject($object) { | ||||
// NOTE: This implementation lacks generality, but there's no great way to | // NOTE: This implementation lacks generality, but there's no great way to | ||||
// figure out if something generates email right now. | // figure out if something generates email right now. | ||||
if ($object instanceof DifferentialDiff) { | if ($object instanceof DifferentialDiff) { | ||||
return false; | return false; | ||||
} | } | ||||
if ($object instanceof PhabricatorMetaMTAMail) { | |||||
return false; | |||||
} | |||||
return true; | return true; | ||||
} | } | ||||
public function getActionGroupKey() { | public function getActionGroupKey() { | ||||
return HeraldNotifyActionGroup::ACTIONGROUPKEY; | return HeraldNotifyActionGroup::ACTIONGROUPKEY; | ||||
} | } | ||||
protected function applyEmail(array $phids, $force) { | protected function applyEmail(array $phids, $force) { | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |