Skip to content

Commit

Permalink
Map assigned users to ATTENDEE
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Mar 7, 2020
1 parent ea8955f commit 84d679f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Db/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function getCalendarObject(): VCalendar {
$event->DTEND = new \DateTime($this->getDuedate());
$event->add('RELATED-TO', 'deck-stack-' . $this->getStackId());

// For write support: CANCELLED / IN-PROCESS handling
// FIXME: For write support: CANCELLED / IN-PROCESS handling
$event->STATUS = $this->getArchived() ? "COMPLETED" : "NEEDS-ACTION";
if ($this->getArchived()) {
$date = new DateTime();
Expand All @@ -141,6 +141,13 @@ public function getCalendarObject(): VCalendar {
return $label->getTitle();
}, $this->getLabels());
}
foreach ($this->getAssignedUsers() as $user) {
$participant = $user->resolveParticipant();
// FIXME use proper uri
$event->add('ATTENDEE', 'https://localhost/remote.php/dav/principals/users/:' . $participant->getUID(), [ 'CN' => $participant->getDisplayName()]);
}


$event->SUMMARY = $this->getTitle();
$calendar->add($event);
return $calendar;
Expand Down

0 comments on commit 84d679f

Please sign in to comment.