mirror of
https://github.com/nextcloud/server.git
synced 2026-04-03 16:16:36 -04:00
Merge pull request #53349 from nextcloud/backport/51131/stable31
[stable31] fix(imip): dont compare events for the reply message
This commit is contained in:
commit
9fdc7fb566
2 changed files with 30 additions and 2 deletions
|
|
@ -186,7 +186,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:
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue