Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4e4eb5c authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

display name fix

parent 3c5b6fa6
Loading
Loading
Loading
Loading
Loading
+15 −17
Original line number Diff line number Diff line
--- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2022-11-25 12:52:41.013768000 +0530
+++ apps/dav/lib/CalDAV/Schedule/iMipPluginNew.php	2022-11-25 12:53:18.603768000 +0530
@@ -237,6 +237,14 @@
From: Avinash <avinashg@e.email>
Date: Tue, 15 Nov 2022 12:50 +0530
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-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');
@@ -11,11 +17,10 @@
+				$senderName = $users[0]->getDisplayName();
+			}
+		}
+
 		$fromName = $l10n->t('%1$s via %2$s', [$senderName, $this->defaults->getName()]);

 		$message = $this->mailer->createMessage()
@@ -252,7 +260,21 @@
@@ -252,7 +259,21 @@

 		$summary = ((string) $summary !== '') ? (string) $summary : $l10n->t('Untitled event');

@@ -38,7 +43,7 @@
 		$this->addBulletList($template, $l10n, $vevent);

 		// Only add response buttons to invitation requests: Fix Issue #11230
@@ -516,6 +538,7 @@
@@ -516,6 +537,7 @@
 		return $dtStart->format('Y-m-d') === $dtEnd->format('Y-m-d');
 	}

@@ -46,7 +51,7 @@
 	/**
 	 * @param IEMailTemplate $template
 	 * @param IL10N $l10n
@@ -542,24 +565,86 @@
@@ -542,24 +564,86 @@
 	/**
 	 * @param IEMailTemplate $template
 	 * @param IL10N $l10n
@@ -144,7 +149,7 @@
 			$template->addBodyListItem(sprintf('<a href="%s">%s</a>',
 					htmlspecialchars($url),
 					htmlspecialchars($url)),
@@ -567,13 +652,16 @@
@@ -567,13 +651,16 @@
 				$this->getAbsoluteImagePath('caldav/link.png'),
 				$url,'',self::IMIP_INDENT);
 		}
@@ -167,7 +172,7 @@
 		}
 	}

@@ -662,7 +750,7 @@
@@ -662,7 +749,7 @@
 										Message $iTipMessage, $lastOccurrence) {
 		$token = $this->createInvitationToken($iTipMessage, $lastOccurrence);

@@ -176,7 +181,7 @@
 			$l10n->t('Accept'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [
 				'token' => $token,
@@ -670,18 +758,10 @@
@@ -670,18 +757,10 @@
 			$l10n->t('Decline'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [
 				'token' => $token,
@@ -198,10 +203,3 @@
 	}

 	/**
@@ -726,4 +806,4 @@

 		return $token;
 	}
-}
\ No newline at end of file
+}