Skip to content

Commit ee89f97

Browse files
hamza221backportbot[bot]
authored andcommitted
fix(imip): dont compare events for the reply message
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
1 parent 66bc0f6 commit ee89f97

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public function schedule(Message $iTipMessage) {
200200
switch (strtolower($iTipMessage->method)) {
201201
case self::METHOD_REPLY:
202202
$method = self::METHOD_REPLY;
203-
$data = $this->imipService->buildBodyData($vEvent, $oldVevent);
203+
$data = $this->imipService->buildReplyBodyData($vEvent);
204204
$replyingAttendee = $this->imipService->getReplyingAttendee($iTipMessage);
205205
break;
206206
case self::METHOD_CANCEL:

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

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,35 @@ public function buildBodyData(VEvent $vEvent, ?VEvent $oldVEvent): array {
169169
if ($eventReaderCurrent->recurs()) {
170170
$data['meeting_occurring'] = $this->generateOccurringString($eventReaderCurrent);
171171
}
172-
172+
return $data;
173+
}
174+
175+
/**
176+
* @param VEvent $vEvent
177+
* @return array
178+
*/
179+
public function buildReplyBodyData(VEvent $vEvent): array {
180+
// construct event reader
181+
$eventReader = new EventReader($vEvent);
182+
$defaultVal = '';
183+
$data = [];
184+
$data['meeting_when'] = $this->generateWhenString($eventReader);
185+
186+
foreach (self::STRING_DIFF as $key => $property) {
187+
$data[$key] = self::readPropertyWithDefault($vEvent, $property, $defaultVal);
188+
}
189+
190+
if (($locationHtml = $this->linkify($data['meeting_location'])) !== null) {
191+
$data['meeting_location_html'] = $locationHtml;
192+
}
193+
194+
$data['meeting_url_html'] = $data['meeting_url'] ? sprintf('<a href="%1$s">%1$s</a>', $data['meeting_url']) : '';
195+
196+
// generate occurring next string
197+
if ($eventReader->recurs()) {
198+
$data['meeting_occurring'] = $this->generateOccurringString($eventReader);
199+
}
200+
173201
return $data;
174202
}
175203

0 commit comments

Comments
 (0)