Differential D11281 Diff 27175 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Show First 20 Lines • Show All 1,925 Lines • ▼ Show 20 Lines | protected function sendMail( | ||||
} | } | ||||
if (!$any_visible) { | if (!$any_visible) { | ||||
return; | return; | ||||
} | } | ||||
$email_to = array_filter(array_unique($this->getMailTo($object))); | $email_to = array_filter(array_unique($this->getMailTo($object))); | ||||
$email_cc = array_filter(array_unique($this->getMailCC($object))); | $email_cc = array_filter(array_unique($this->getMailCC($object))); | ||||
$phids = array_merge($email_to, $email_cc); | $phids = array_merge($email_to, $email_cc); | ||||
$handles = id(new PhabricatorHandleQuery()) | $handles = id(new PhabricatorHandleQuery()) | ||||
fabe: It seems somewhat duplicate to load the handles and load the Users.
However the policy check… | |||||
->setViewer($this->requireActor()) | ->setViewer($this->requireActor()) | ||||
->withPHIDs($phids) | ->withPHIDs($phids) | ||||
->execute(); | ->execute(); | ||||
$template = $this->buildMailTemplate($object); | $template = $this->buildMailTemplate($object); | ||||
$body = $this->buildMailBody($object, $xactions); | $body = $this->buildMailBody($object, $xactions); | ||||
$mail_tags = $this->getMailTags($object, $xactions); | $mail_tags = $this->getMailTags($object, $xactions); | ||||
▲ Show 20 Lines • Show All 659 Lines • Show Last 20 Lines |
It seems somewhat duplicate to load the handles and load the Users.
However the policy check needs the real user and the multiplexMail function relies just on object handles...
Is there some way to get an object handle form an existing user object?