mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-20 18:58:56 +01:00
Fix grossness in Herald daemon
Summary: Do this in a reasonably proper / formal way. Leave a TODO for the policy stuff. Test Plan: Ran `scripts/repository/reparse.php --herald rPnnnnn` Reviewers: vrana Reviewed By: vrana CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D5150
This commit is contained in:
parent
94d39257be
commit
e3567b2d4d
1 changed files with 4 additions and 7 deletions
|
@ -77,14 +77,8 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
|||
$commit->getPHID(),
|
||||
));
|
||||
|
||||
// TODO: This is complicated and needs to be sorted out properly for
|
||||
// repository policy stuff. We might need an omniscient user here? This
|
||||
// fakes a logged-in user.
|
||||
$viewer = id(new PhabricatorUser())
|
||||
->setPHID('PHID-USER-XXX');
|
||||
|
||||
$handles = id(new PhabricatorObjectHandleData($phids))
|
||||
->setViewer($viewer)
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->loadHandles();
|
||||
|
||||
$commit_handle = $handles[$commit->getPHID()];
|
||||
|
@ -158,6 +152,9 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
|||
$template->setFrom($author_phid);
|
||||
}
|
||||
|
||||
// TODO: We should verify that each recipient can actually see the
|
||||
// commit before sending them email (T603).
|
||||
|
||||
$mails = $reply_handler->multiplexMail(
|
||||
$template,
|
||||
id(new PhabricatorObjectHandleData($email_phids))->loadHandles(),
|
||||
|
|
Loading…
Add table
Reference in a new issue