summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/Schedule
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2020-03-26 18:32:09 +0100
committerThomas Citharel <tcit@tcit.fr>2020-04-03 13:49:25 +0200
commit058ffa37ff33f898497f92b1b8c6e528170a4215 (patch)
tree93cd3321ec6f25e81255acb04b0d881490d25891 /apps/dav/lib/CalDAV/Schedule
parent054df038def136ba1c9e9c26a1e0ce3db0a17307 (diff)
downloadnextcloud-server-058ffa37ff33f898497f92b1b8c6e528170a4215.tar.gz
nextcloud-server-058ffa37ff33f898497f92b1b8c6e528170a4215.zip
Add default titles for titleless events in invitations
Closes #19662 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/dav/lib/CalDAV/Schedule')
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index cb3bfb4f43d..5493eb693f9 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -43,6 +43,7 @@ use OCP\L10N\IFactory as L10NFactory;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
use OCP\Security\ISecureRandom;
+use OCP\Util;
use Sabre\CalDAV\Schedule\IMipPlugin as SabreIMipPlugin;
use Sabre\VObject\Component\VCalendar;
use Sabre\VObject\Component\VEvent;
@@ -246,7 +247,7 @@ class IMipPlugin extends SabreIMipPlugin {
'meeting_url' => (string)$meetingUrl ?: $defaultVal,
];
- $fromEMail = \OCP\Util::getDefaultEmailAddress('invitations-noreply');
+ $fromEMail = Util::getDefaultEmailAddress('invitations-noreply');
$fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]);
$message = $this->mailer->createMessage()
@@ -257,6 +258,8 @@ class IMipPlugin extends SabreIMipPlugin {
$template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data);
$template->addHeader();
+ $summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event');
+
$this->addSubjectAndHeading($template, $l10n, $method, $summary,
$meetingAttendeeName, $meetingInviteeName);
$this->addBulletList($template, $l10n, $meetingWhen, $meetingLocation,