@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+15
+15
src/applications/project/storage/PhabricatorProjectTransaction.php
··· 69 69 return parent::getColor(); 70 70 } 71 71 72 + public function shouldHide() { 73 + switch ($this->getTransactionType()) { 74 + case PhabricatorTransactions::TYPE_EDGE: 75 + $edge_type = $this->getMetadataValue('edge:type'); 76 + switch ($edge_type) { 77 + case PhabricatorProjectSilencedEdgeType::EDGECONST: 78 + return true; 79 + default: 80 + break; 81 + } 82 + } 83 + 84 + return parent::shouldHide(); 85 + } 86 + 72 87 public function shouldHideForFeed() { 73 88 switch ($this->getTransactionType()) { 74 89 case self::TYPE_HASWORKBOARD: