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

Apply Herald subscription effects immediately

Summary:
Fixes T8464. We could incorrectly use a cached value when computing CC's.

Just load a fresh value. There are no other callers that would benefit from this cache, so it's more complicated to reload it correctly prior to publishing than to just skip it.

Also make the PHID headers unique.

Test Plan:
- Verified that users received mail about the transactions which caused them to be added to an object.
- Veirfied that headers no longer have redundant values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8464

Differential Revision: https://secure.phabricator.com/D13206

+4 -6
+1
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 176 176 } 177 177 178 178 public function addPHIDHeaders($name, array $phids) { 179 + $phids = array_unique($phids); 179 180 foreach ($phids as $phid) { 180 181 $this->addHeader($name, '<'.$phid.'>'); 181 182 }
+3 -6
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 1018 1018 PhabricatorLiskDAO $object, 1019 1019 array $xactions) { 1020 1020 1021 - // Before sending mail or publishing feed stories, reload the object 1022 - // subscribers to pick up changes caused by Herald (or by other side effects 1023 - // in various transaction phases). 1024 - $this->loadSubscribers($object); 1025 - // Hook for other edges that may need (re-)loading 1021 + // Hook for edges or other properties that may need (re-)loading 1026 1022 $object = $this->willPublish($object, $xactions); 1027 1023 1028 1024 $mailed = array(); ··· 2424 2420 $has_support = false; 2425 2421 2426 2422 if ($object instanceof PhabricatorSubscribableInterface) { 2427 - $phids[] = $this->subscribers; 2423 + $phid = $object->getPHID(); 2424 + $phids[] = PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); 2428 2425 $has_support = true; 2429 2426 } 2430 2427