-
Notifications
You must be signed in to change notification settings - Fork 347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SchedulingPlugin reset attendee participation state on significant event change #1443
base: master
Are you sure you want to change the base?
Conversation
00cf16c
to
81ebab0
Compare
@georgehrke @miaulalala I'm a bit lost here. With this PR, the attendee |
Hi onny, I think this might have to do with nextcloud and not sabre. Can you check the ics in the database table oc_calendarobjects to determine if this is limited to the frontend or of the calendarobject itself doesn't get updated? |
@miaulalala Thank you for the hint, this was quite interesting to look into. In case there's an additional attendee assigned to an calendar event, a second object gets created in the database. When accepting the invitation, the
Even when accepting again the second invitation, the I'm not quite sure yet why there are two objects, if both needs to get updated and how to access them. |
Oh I see the one calendar object with the calendar-id |
Hi onny, I'm still catching up on things after my hols but this is what it sounds like to me off the top of my head: The delivery should handle the new partstats for all attendees, but it might be dropped somewhere along the way, I've seen that before with accepted invitations. \Sabre\CalDAV\Schedule\Plugin::scheduleLocalDelivery and maybe look into what type of iTip request it is - if it's a REQUEST it uses a different logic than the REPLY for example. Will dig into this a bit further when I have some time :) |
Thank you for the replay, haven't managed yet to catch all iTip messages and set But I confirmed that in theory resetting this property in case of a event update works. I manually set It does not work if not all Sorry if this sounds complicated ^^ Just have to get
work for all attendees. |
Would be happy if someone could give me some advice on how to update the |
@miaulalala The protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
{
$broker = new ITip\Broker();
foreach ($newObject->VEVENT->ATTENDEE as $attendee) {
$attendee['PARTSTAT'] = "NEEDS-ACTION";
}
$messages = $broker->parseEvent($newObject, $addresses, $oldObject);
if ($messages) {
$modified = true;
} It is not possible to manipulate You also mentioned different iTipMessage methos, so I added an additional if ($isNewNode) {
$calendar = $this->server->tree->getNodeForPath($calendarPath);
$calendar->createFile($newFileName, $newObject->serialize());
} else {
// If the message was a reply, we may have to inform other
// attendees of this attendees status. Therefore we're shooting off
// another itipMessage.
if ('REPLY' === $iTipMessage->method) {
$this->processICalendarChange(
$oldICalendarData,
$newObject,
[$iTipMessage->recipient],
[$iTipMessage->sender]
);
} elseif ('REQUEST' === $iTipMessage->method) {
$this->processICalendarChange(
$oldICalendarData,
$newObject,
[$iTipMessage->recipient],
[$iTipMessage->sender]
);
}
$objectNode->put($newObject->serialize()); This fires several |
There's the |
Reset attendee participation state to "NEEDS-ACTION" if change to an existing event is significant.
Currently this PR does fix an issue described in #1282 where an accepted invitation of an attendee stays accepted even if the organizer changes the event date.
Unfortunately accepting the changed event doesn't seem to work. At least the attendee state in Nextcloud remains on "pending approval".
Todo