diff options
author | Hamza Mahjoubi <hamzamahjoubi221@gmail.com> | 2025-02-28 12:12:39 +0100 |
---|---|---|
committer | Hamza Mahjoubi <hamzamahjoubi221@gmail.com> | 2025-03-26 15:07:19 +0100 |
commit | cafd8ade54413d7d8f122ee8a3031c9e76c18208 (patch) | |
tree | 0638f82fd1670c40301014a48bc35da13dedc11e | |
parent | 28a2965a31aba25035ca8350684f1c4d26c30248 (diff) | |
download | nextcloud-server-fix/reply-message.tar.gz nextcloud-server-fix/reply-message.zip |
fix(imip): dont compare events for the reply messagefix/reply-message
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipService.php | 30 |
2 files changed, 30 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 7e79388c53a..281089c1c92 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -185,7 +185,7 @@ class IMipPlugin extends SabreIMipPlugin { switch (strtolower($iTipMessage->method)) { case self::METHOD_REPLY: $method = self::METHOD_REPLY; - $data = $this->imipService->buildBodyData($vEvent, $oldVevent); + $data = $this->imipService->buildReplyBodyData($vEvent); $replyingAttendee = $this->imipService->getReplyingAttendee($iTipMessage); break; case self::METHOD_CANCEL: diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index e2844960a23..e14630f4e39 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -159,7 +159,35 @@ class IMipService { if ($eventReaderCurrent->recurs()) { $data['meeting_occurring'] = $this->generateOccurringString($eventReaderCurrent); } - + return $data; + } + + /** + * @param VEvent $vEvent + * @return array + */ + public function buildReplyBodyData(VEvent $vEvent): array { + // construct event reader + $eventReader = new EventReader($vEvent); + $defaultVal = ''; + $data = []; + $data['meeting_when'] = $this->generateWhenString($eventReader); + + foreach (self::STRING_DIFF as $key => $property) { + $data[$key] = self::readPropertyWithDefault($vEvent, $property, $defaultVal); + } + + if (($locationHtml = $this->linkify($data['meeting_location'])) !== null) { + $data['meeting_location_html'] = $locationHtml; + } + + $data['meeting_url_html'] = $data['meeting_url'] ? sprintf('<a href="%1$s">%1$s</a>', $data['meeting_url']) : ''; + + // generate occurring next string + if ($eventReader->recurs()) { + $data['meeting_occurring'] = $this->generateOccurringString($eventReader); + } + return $data; } |