Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/storage/PhabricatorCalendarEvent.php
Show First 20 Lines • Show All 752 Lines • ▼ Show 20 Lines | public function newIntermediateEventNode( | ||||
foreach ($invitees as $invitee) { | foreach ($invitees as $invitee) { | ||||
$phids[] = $invitee->getInviteePHID(); | $phids[] = $invitee->getInviteePHID(); | ||||
} | } | ||||
$handles = $viewer->loadHandles($phids); | $handles = $viewer->loadHandles($phids); | ||||
$host_handle = $handles[$host_phid]; | $host_handle = $handles[$host_phid]; | ||||
$host_name = $host_handle->getFullName(); | $host_name = $host_handle->getFullName(); | ||||
$host_uri = $host_handle->getURI(); | |||||
$host_uri = PhabricatorEnv::getURI($host_uri); | // NOTE: Gmail shows "Who: Unknown Organizer*" if the organizer URI does | ||||
// not look like an email address. Use a synthetic address so it shows | |||||
// the host name instead. | |||||
$install_uri = PhabricatorEnv::getProductionURI('/'); | |||||
$install_uri = new PhutilURI($install_uri); | |||||
// This should possibly use "metamta.reply-handler-domain" instead, but | |||||
// we do not currently accept mail for users anyway, and that option may | |||||
// not be configured. | |||||
$mail_domain = $install_uri->getDomain(); | |||||
$host_uri = "mailto:{$host_phid}@{$mail_domain}"; | |||||
$organizer = id(new PhutilCalendarUserNode()) | $organizer = id(new PhutilCalendarUserNode()) | ||||
->setName($host_name) | ->setName($host_name) | ||||
->setURI($host_uri); | ->setURI($host_uri); | ||||
$attendees = array(); | $attendees = array(); | ||||
foreach ($invitees as $invitee) { | foreach ($invitees as $invitee) { | ||||
$invitee_phid = $invitee->getInviteePHID(); | $invitee_phid = $invitee->getInviteePHID(); | ||||
▲ Show 20 Lines • Show All 510 Lines • Show Last 20 Lines |