Skip to content

Commit 784b2bd

Browse files
authored
Merge pull request #37626 from nextcloud/fix/compare-imip-email-values
fix(dav): add string comparison for diff
2 parents 9201742 + 1811a0e commit 784b2bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/dav/lib/CalDAV/Schedule/IMipService.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private function generateDiffString(VEvent $vevent, VEvent $oldVEvent, string $p
9898
return $default;
9999
}
100100
$newstring = $vevent->$property->getValue();
101-
if(isset($oldVEvent->$property)) {
101+
if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring ) {
102102
$oldstring = $oldVEvent->$property->getValue();
103103
return sprintf($strikethrough, $oldstring, $newstring);
104104
}
@@ -128,7 +128,7 @@ public function buildBodyData(VEvent $vEvent, ?VEvent $oldVEvent): array {
128128
$data['meeting_location_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'LOCATION', $data['meeting_location']);
129129

130130
$oldUrl = self::readPropertyWithDefault($oldVEvent, 'URL', $defaultVal);
131-
$data['meeting_url_html'] = !empty($oldUrl) ? sprintf('<a href="%1$s">%1$s</a>', $oldUrl) : $data['meeting_url'];
131+
$data['meeting_url_html'] = !empty($oldUrl) && $oldUrl !== $data['meeting_url'] ? sprintf('<a href="%1$s">%1$s</a>', $oldUrl) : $data['meeting_url'];
132132

133133
$data['meeting_when_html'] =
134134
($oldMeetingWhen !== $data['meeting_when'] && $oldMeetingWhen !== null)
@@ -477,7 +477,7 @@ public function addAttendees(IEMailTemplate $template, VEvent $vevent) {
477477
*/
478478
public function addBulletList(IEMailTemplate $template, VEvent $vevent, $data) {
479479
$template->addBodyListItem(
480-
$data['meeting_title'], $this->l10n->t('Title:'),
480+
$data['meeting_title_html'] ?? $data['meeting_title'], $this->l10n->t('Title:'),
481481
$this->getAbsoluteImagePath('caldav/title.png'), $data['meeting_title'], '', IMipPlugin::IMIP_INDENT);
482482
if ($data['meeting_when'] !== '') {
483483
$template->addBodyListItem($data['meeting_when_html'] ?? $data['meeting_when'], $this->l10n->t('Time:'),

0 commit comments

Comments
 (0)