@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.

Fix Differential "unsubscribe" so it properly blocks resubscription

Summary:
DifferentialRevision stores this field as a dictionary but the
Editor incorrectly passed it to Herald as a raw value array. Ideally the
property should be called unsubscribedDict or something but I'm increasingly
thinking we're going to centralize subscriptions for Adjutant or some similar
system so I'm disinclined to pursue the schema change just yet. I provided an
explicit raw-value-oriented API, at least.

Test Plan:
With two accounts, A and B: created universal Herald CC rule with
user B, created a revision with user A, had user B unsubscribe, had user A
update the revision. User B was not resubscribed.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: ola, aran, epriestley
Differential Revision: 188

+5 -1
+1 -1
src/applications/differential/editor/revision/DifferentialRevisionEditor.php
··· 204 204 $diff); 205 205 $adapter->setExplicitCCs($new['ccs']); 206 206 $adapter->setExplicitReviewers($new['rev']); 207 - $adapter->setForbiddenCCs($revision->getUnsubscribed()); 207 + $adapter->setForbiddenCCs($revision->getUnsubscribedPHIDs()); 208 208 209 209 $xscript = HeraldEngine::loadAndApplyRules($adapter); 210 210 $xscript_uri = PhabricatorEnv::getProductionURI(
+4
src/applications/differential/storage/revision/DifferentialRevision.php
··· 151 151 public function getRawRelations($relation) { 152 152 return idx($this->relationships, $relation, array()); 153 153 } 154 + 155 + public function getUnsubscribedPHIDs() { 156 + return array_keys($this->getUnsubscribed()); 157 + } 154 158 }