diff --git a/patches/015-email-mail-template.patch b/patches/015-email-mail-template.patch index 72af74d74f97df4bc286f015c87177b1eeb1094a..646253b9ceb9ca205c295b904408975d64843e36 100644 --- a/patches/015-email-mail-template.patch +++ b/patches/015-email-mail-template.patch @@ -4,9 +4,23 @@ Subject: [PATCH] To implement custom email template design for calendar invite This patch is allowing to customize the email template design for invitation ---- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php 2022-11-10 10:39:19.134653000 +0530 -+++ ./apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php 2022-11-11 12:28:15.829119700 +0530 -@@ -252,7 +252,21 @@ +--- apps/dav-4/lib/CalDAV/Schedule/IMipPlugin.php 2022-11-10 10:39:19.134653000 +0530 ++++ apps/dav-4/lib/CalDAV/Schedule/iMipPluginNew.php 2022-11-25 15:05:11.443768000 +0530 +@@ -237,6 +237,13 @@ + ]; + + $fromEMail = Util::getDefaultEmailAddress('invitations-noreply'); ++ //if sender name is empty sometimes in case of email client ++ if ($senderName === null || empty(trim($senderName))) { ++ $users = $this->userManager->getByEmail($sender); ++ if (count($users) === 1) { ++ $senderName = $users[0]->getDisplayName(); ++ } ++ } + $fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]); + + $message = $this->mailer->createMessage() +@@ -252,7 +259,21 @@ $summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event'); @@ -29,7 +43,7 @@ This patch is allowing to customize the email template design for invitation $this->addBulletList($template, $l10n, $vevent); // Only add response buttons to invitation requests: Fix Issue #11230 -@@ -516,6 +530,7 @@ +@@ -516,6 +537,7 @@ return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d'); } @@ -37,7 +51,7 @@ This patch is allowing to customize the email template design for invitation /** * @param IEMailTemplate $template * @param IL10N $l10n -@@ -542,24 +557,86 @@ +@@ -542,24 +564,86 @@ /** * @param IEMailTemplate $template * @param IL10N $l10n @@ -79,8 +93,7 @@ This patch is allowing to customize the email template design for invitation + $lastmodified=$dtstampTime; + $selectedEvent = $currentevent; + } - } -- $meetingWhen = $this->generateWhenString($l10n, $vevent); ++ } + if ($selectedEvent->SUMMARY) { + if (trim($selectedEvent->SUMMARY) == trim($parentevent->SUMMARY)) { + $template->addBodyListItem($selectedEvent->SUMMARY, $l10n->t('Title:'), @@ -89,7 +102,8 @@ This patch is allowing to customize the email template design for invitation + $template->addBodyListItemModified($selectedEvent->SUMMARY, $l10n->t('Updated Title:'), + $this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT); + } -+ } + } +- $meetingWhen = $this->generateWhenString($l10n, $vevent); + $meetingWhen = $this->generateWhenString($l10n, $selectedEvent); if ($meetingWhen) { - $template->addBodyListItem($meetingWhen, $l10n->t('Time:'), @@ -135,7 +149,7 @@ This patch is allowing to customize the email template design for invitation $template->addBodyListItem(sprintf('%s', htmlspecialchars($url), htmlspecialchars($url)), -@@ -567,13 +644,16 @@ +@@ -567,13 +651,16 @@ $this->getAbsoluteImagePath('caldav/link.png'), $url,'',self::IMIP_INDENT); } @@ -158,7 +172,7 @@ This patch is allowing to customize the email template design for invitation } } -@@ -662,7 +742,7 @@ +@@ -662,7 +749,7 @@ Message $iTipMessage, $lastOccurrence) { $token = $this->createInvitationToken($iTipMessage, $lastOccurrence); @@ -167,7 +181,7 @@ This patch is allowing to customize the email template design for invitation $l10n->t('Accept'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [ 'token' => $token, -@@ -670,18 +750,10 @@ +@@ -670,18 +757,10 @@ $l10n->t('Decline'), $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [ 'token' => $token,