Skip to content

Commit 84d679f

Browse files
committed
Map assigned users to ATTENDEE
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent ea8955f commit 84d679f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/Db/Card.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function getCalendarObject(): VCalendar {
129129
$event->DTEND = new \DateTime($this->getDuedate());
130130
$event->add('RELATED-TO', 'deck-stack-' . $this->getStackId());
131131

132-
// For write support: CANCELLED / IN-PROCESS handling
132+
// FIXME: For write support: CANCELLED / IN-PROCESS handling
133133
$event->STATUS = $this->getArchived() ? "COMPLETED" : "NEEDS-ACTION";
134134
if ($this->getArchived()) {
135135
$date = new DateTime();
@@ -141,6 +141,13 @@ public function getCalendarObject(): VCalendar {
141141
return $label->getTitle();
142142
}, $this->getLabels());
143143
}
144+
foreach ($this->getAssignedUsers() as $user) {
145+
$participant = $user->resolveParticipant();
146+
// FIXME use proper uri
147+
$event->add('ATTENDEE', 'https://localhost/remote.php/dav/principals/users/:' . $participant->getUID(), [ 'CN' => $participant->getDisplayName()]);
148+
}
149+
150+
144151
$event->SUMMARY = $this->getTitle();
145152
$calendar->add($event);
146153
return $calendar;

0 commit comments

Comments
 (0)