1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 13:30:55 +01:00

In Calendar, only include the event description in the original event mail

Summary: Ref T11809. This makes the mail more consistent with Differential and Maniphest, which only include additional details in the first mail in the thread.

Test Plan:
  - Created an event with a description.
  - First mail included it.
  - Followups did not.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11809

Differential Revision: https://secure.phabricator.com/D16794
This commit is contained in:
epriestley 2016-11-02 13:09:08 -07:00
parent c9510cc118
commit 64cf9204c1

View file

@ -304,28 +304,31 @@ final class PhabricatorCalendarEventEditor
protected function buildMailTemplate(PhabricatorLiskDAO $object) { protected function buildMailTemplate(PhabricatorLiskDAO $object) {
$id = $object->getID(); $id = $object->getID();
$name = $object->getName(); $name = $object->getName();
$monogram = $object->getMonogram();
return id(new PhabricatorMetaMTAMail()) return id(new PhabricatorMetaMTAMail())
->setSubject("E{$id}: {$name}") ->setSubject("{$monogram}: {$name}")
->addHeader('Thread-Topic', "E{$id}: ".$object->getName()); ->addHeader('Thread-Topic', $monogram);
} }
protected function buildMailBody( protected function buildMailBody(
PhabricatorLiskDAO $object, PhabricatorLiskDAO $object,
array $xactions) { array $xactions) {
$description = $object->getDescription();
$body = parent::buildMailBody($object, $xactions); $body = parent::buildMailBody($object, $xactions);
$description = $object->getDescription();
if ($this->getIsNewObject()) {
if (strlen($description)) { if (strlen($description)) {
$body->addRemarkupSection( $body->addRemarkupSection(
pht('EVENT DESCRIPTION'), pht('EVENT DESCRIPTION'),
$description); $description);
} }
}
$body->addLinkSection( $body->addLinkSection(
pht('EVENT DETAIL'), pht('EVENT DETAIL'),
PhabricatorEnv::getProductionURI('/E'.$object->getID())); PhabricatorEnv::getProductionURI($object->getURI()));
$ics_attachment = $this->newICSAttachment($object); $ics_attachment = $this->newICSAttachment($object);
$body->addAttachment($ics_attachment); $body->addAttachment($ics_attachment);