Page MenuHomePhabricator

D14086.id34046.diff
No OneTemporary

D14086.id34046.diff

diff --git a/src/applications/conpherence/mail/ConpherenceCreateThreadMailReceiver.php b/src/applications/conpherence/mail/ConpherenceCreateThreadMailReceiver.php
--- a/src/applications/conpherence/mail/ConpherenceCreateThreadMailReceiver.php
+++ b/src/applications/conpherence/mail/ConpherenceCreateThreadMailReceiver.php
@@ -56,7 +56,7 @@
->setMailReceiver(ConpherenceThread::initializeNewRoom($sender))
->setMailAddedParticipantPHIDs($phids)
->setActor($sender)
- ->setExcludeMailRecipientPHIDs($mail->loadExcludeMailRecipientPHIDs())
+ ->setExcludeMailRecipientPHIDs($mail->loadAllRecipientPHIDs())
->processEmail($mail);
if ($conpherence) {
diff --git a/src/applications/maniphest/mail/ManiphestCreateMailReceiver.php b/src/applications/maniphest/mail/ManiphestCreateMailReceiver.php
--- a/src/applications/maniphest/mail/ManiphestCreateMailReceiver.php
+++ b/src/applications/maniphest/mail/ManiphestCreateMailReceiver.php
@@ -24,7 +24,7 @@
$handler->setActor($sender);
$handler->setExcludeMailRecipientPHIDs(
- $mail->loadExcludeMailRecipientPHIDs());
+ $mail->loadAllRecipientPHIDs());
if ($this->getApplicationEmail()) {
$handler->setApplicationEmail($this->getApplicationEmail());
}
diff --git a/src/applications/maniphest/mail/ManiphestReplyHandler.php b/src/applications/maniphest/mail/ManiphestReplyHandler.php
--- a/src/applications/maniphest/mail/ManiphestReplyHandler.php
+++ b/src/applications/maniphest/mail/ManiphestReplyHandler.php
@@ -19,17 +19,28 @@
$object = $this->getMailReceiver();
$is_new = !$object->getID();
+ $actor = $this->getActor();
$xactions = array();
if ($is_new) {
- $xactions[] = $object->getApplicationTransactionTemplate()
+ $xactions[] = $this->newTransaction()
->setTransactionType(ManiphestTransaction::TYPE_TITLE)
->setNewValue(nonempty($mail->getSubject(), pht('Untitled Task')));
- $xactions[] = $object->getApplicationTransactionTemplate()
+ $xactions[] = $this->newTransaction()
->setTransactionType(ManiphestTransaction::TYPE_DESCRIPTION)
->setNewValue($body);
+
+ $actor_phid = $actor->getPHID();
+ if ($actor_phid) {
+ $xactions[] = $this->newTransaction()
+ ->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS)
+ ->setNewValue(
+ array(
+ '+' => array($actor_phid),
+ ));
+ }
}
return $xactions;
diff --git a/src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php b/src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php
--- a/src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php
+++ b/src/applications/metamta/receiver/PhabricatorObjectMailReceiver.php
@@ -49,7 +49,7 @@
return $handler
->setMailReceiver($object)
->setActor($sender)
- ->setExcludeMailRecipientPHIDs($mail->loadExcludeMailRecipientPHIDs())
+ ->setExcludeMailRecipientPHIDs($mail->loadAllRecipientPHIDs())
->processEmail($mail);
}
diff --git a/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php b/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
--- a/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
+++ b/src/applications/metamta/storage/PhabricatorMetaMTAReceivedMail.php
@@ -82,7 +82,7 @@
return $this->getRawEmailAddresses(idx($this->headers, 'to'));
}
- public function loadExcludeMailRecipientPHIDs() {
+ public function loadAllRecipientPHIDs() {
$addresses = array_merge(
$this->getToAddresses(),
$this->getCCAddresses());
diff --git a/src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php b/src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php
--- a/src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php
+++ b/src/applications/transactions/replyhandler/PhabricatorApplicationTransactionReplyHandler.php
@@ -39,7 +39,7 @@
return $editor;
}
- private function newTransaction() {
+ protected function newTransaction() {
return $this->getMailReceiver()->getApplicationTransactionTemplate();
}
@@ -80,15 +80,15 @@
$xactions = $this->didReceiveMail($mail, $body);
// If this object is subscribable, subscribe all the users who were
- // CC'd on the message.
+ // recipients on the message.
if ($object instanceof PhabricatorSubscribableInterface) {
- $subscriber_phids = $mail->loadCCPHIDs();
+ $subscriber_phids = $mail->loadAllRecipientPHIDs();
if ($subscriber_phids) {
$xactions[] = $this->newTransaction()
->setTransactionType(PhabricatorTransactions::TYPE_SUBSCRIBERS)
->setNewValue(
array(
- '+' => array($viewer->getPHID()),
+ '+' => $subscriber_phids,
));
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 1, 10:52 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710244
Default Alt Text
D14086.id34046.diff (4 KB)

Event Timeline