1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Don't publish anything for "Disable Mail" / "Enable Mail" on projects

Summary:
Fixes T10466. Currently, clicking "Disable Mail" or "Enable Mail" on a project toggles an edge, but it gets a default "added an edge" story and transaction record.

These are confusing, useless and not interesting, so just hide them.

Test Plan:
  - Before patch: clicked enable/disable mail, saw "added an edge" / "removed an edge" stories in feed and project history.
  - After patch: clicked enable/disable mail, saw nothing in feed or project history.
  - (Note that this patch is not retroactive for feed, so already-published stories won't unpublish.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10466

Differential Revision: https://secure.phabricator.com/D15361
This commit is contained in:
epriestley 2016-02-28 16:28:43 -08:00
parent 5295c6ba1e
commit 2e19b78b8d

View file

@ -69,6 +69,21 @@ final class PhabricatorProjectTransaction
return parent::getColor();
}
public function shouldHide() {
switch ($this->getTransactionType()) {
case PhabricatorTransactions::TYPE_EDGE:
$edge_type = $this->getMetadataValue('edge:type');
switch ($edge_type) {
case PhabricatorProjectSilencedEdgeType::EDGECONST:
return true;
default:
break;
}
}
return parent::shouldHide();
}
public function shouldHideForFeed() {
switch ($this->getTransactionType()) {
case self::TYPE_HASWORKBOARD: