mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 08:42:41 +01:00
attempt 3 at fixing conpherence mail handler
Summary: you have to attach files and participants before you can start editing the conpherenece Test Plan: push it live and try again Reviewers: chad, epriestley Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2399 Differential Revision: https://secure.phabricator.com/D4674
This commit is contained in:
parent
dca2048bab
commit
64543a9476
1 changed files with 16 additions and 0 deletions
|
@ -31,6 +31,22 @@ final class ConpherenceReplyHandler extends PhabricatorMailReplyHandler {
|
||||||
protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) {
|
protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) {
|
||||||
$conpherence = $this->getMailReceiver();
|
$conpherence = $this->getMailReceiver();
|
||||||
$user = $this->getActor();
|
$user = $this->getActor();
|
||||||
|
if (!$conpherence->getPHID()) {
|
||||||
|
$conpherence
|
||||||
|
->attachParticipants(array())
|
||||||
|
->attachFilePHIDs(array());
|
||||||
|
} else {
|
||||||
|
$edge_type = PhabricatorEdgeConfig::TYPE_OBJECT_HAS_FILE;
|
||||||
|
$file_phids = PhabricatorEdgeQuery::loadDestinationPHIDs(
|
||||||
|
$conpherence->getPHID(),
|
||||||
|
$edge_type
|
||||||
|
);
|
||||||
|
$conpherence->attachFilePHIDs($file_phids);
|
||||||
|
$participants = id(new ConpherenceParticipant())
|
||||||
|
->loadAllWhere('conpherencePHID = %s', $conpherence->getPHID());
|
||||||
|
$participants = mpull($participants, null, 'getParticipantPHID');
|
||||||
|
$conpherence->attachParticipants($participants);
|
||||||
|
}
|
||||||
|
|
||||||
$body = $mail->getCleanTextBody();
|
$body = $mail->getCleanTextBody();
|
||||||
$body = trim($body);
|
$body = trim($body);
|
||||||
|
|
Loading…
Reference in a new issue