summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-04-07 11:22:17 +0200
committerGitHub <noreply@github.com>2020-04-07 11:22:17 +0200
commite266666380a4cc9d748dab895a1038f20fe07832 (patch)
treecfe184b91bdb1299f93ef2680047f09de84d1da3 /apps/dav/lib
parent50ad706a33820610b2299376ad406a6be0acfc4b (diff)
parent058ffa37ff33f898497f92b1b8c6e528170a4215 (diff)
downloadnextcloud-server-e266666380a4cc9d748dab895a1038f20fe07832.tar.gz
nextcloud-server-e266666380a4cc9d748dab895a1038f20fe07832.zip
Merge pull request #20188 from nextcloud/bug/19662/add-default-title-for-event-in-invitatios
Add default titles for titleless events in invitations
Diffstat (limited to 'apps/dav/lib')
-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,