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

Pholio - upgrade herald effects to use transactions

Summary: Ref T4484

Test Plan: Made a mock. Made a herald rule to subscribe a user if mock had a string in title. Edited mock to have said string. Observed user subscribed correctly.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T4484

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

+6 -7
+6 -7
src/applications/pholio/editor/PholioMockEditor.php
··· 462 462 HeraldAdapter $adapter, 463 463 HeraldTranscript $transcript) { 464 464 465 - // TODO: Convert this to be transaction-based. 465 + $xactions = array(); 466 466 467 467 $cc_phids = $adapter->getCcPHIDs(); 468 468 if ($cc_phids) { 469 - id(new PhabricatorSubscriptionsEditor()) 470 - ->setObject($object) 471 - ->setActor($this->requireActor()) 472 - ->subscribeImplicit($cc_phids) 473 - ->save(); 469 + $value = array_fuse($cc_phids); 470 + $xactions[] = id(new PholioTransaction()) 471 + ->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS) 472 + ->setNewValue(array('+' => $value)); 474 473 } 475 474 476 - return array(); 475 + return $xactions; 477 476 } 478 477 479 478 protected function sortTransactions(array $xactions) {