Skip to content

Conversation

@miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Jul 21, 2021

@miaulalala miaulalala self-assigned this Jul 21, 2021
@miaulalala miaulalala changed the title fix scheduling plugin not updating responding attendee status Scheduling plugin not updating responding attendee status Jul 21, 2021
@miaulalala miaulalala requested a review from skjnldsv July 22, 2021 11:42
@miaulalala miaulalala added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 22, 2021
@miaulalala miaulalala marked this pull request as ready for review July 22, 2021 13:55
@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Aug 18, 2021
@miaulalala miaulalala force-pushed the fix/attendees-not-updated-in-calendar branch from 3879be5 to 29922f7 Compare September 14, 2021 08:46
@miaulalala miaulalala added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 14, 2021
@szaimen szaimen added this to the Nextcloud 23 milestone Sep 14, 2021
@miaulalala
Copy link
Contributor Author

Shall we backport this?

@ChristophWurst
Copy link
Member

/backport to stable22

@ChristophWurst
Copy link
Member

/backport to stable21

@ChristophWurst
Copy link
Member

/backport to stable20

@miaulalala
Copy link
Contributor Author

Drone failure is unrelated

@kesselb
Copy link
Contributor

kesselb commented Sep 22, 2021

I'm not able to reproduce the initial issue on master anymore. On master and this branch the attendance status is updated properly and shows the right state 😕

@kesselb
Copy link
Contributor

kesselb commented Sep 23, 2021

I'm not able to reproduce the initial issue on master anymore. On master and this branch the attendance status is updated properly and shows the right state confused

My bad 🙈 I looked at the wrong point. For master and this pull request the attendance status for the organizer is updated properly.

The purpose of this pull request is to fix an issue with updating the attendance status for the attendee itself. To reproduce create a event and invite Alice and Bob. Wait for Bob's invitation email and accept the invite. The attendance status for the organizer and Alice is updated (Bob accepted the invite). In Bob's calendar event the attendance status is still pending.

A possible explanation for this case is the way we handle event invitations. If a user accept or decline an invitation a iTip message is generated.

$iTipMessage->sender = $row['attendee'];
$iTipMessage->recipient = $row['organizer'];

The recipient is used to select the right event from the calendar. When Alice accept the invite an iTip message is generated with sender = [email protected] and recipient = [email protected]. The event for recipient [email protected] is selected and the attendance status for [email protected] updated. Then for every other attendee another iTip message is generated to also update their event.

https://github.com/nextcloud/3rdparty/blob/6876f1fce8d1c70790c165dd7ed0b4214364e397/sabre/dav/lib/CalDAV/Schedule/Plugin.php#L527-L538

image

Sabre assume that we already updated Alice event and there is no need to sent a iTip message to Alice.

$iTipMessage->sender = $row['attendee']; 
$iTipMessage->recipient = $row['attendee']; 

I'm not sure if that's a valid iTip message. But when sender = recipient the calendar event for the attendee is updated and a iTip message for the organizer and other attendees generated and properly updated.

Just adding my findings here to document it for later. I guess it's fine to merge this pull request and take out the ignore check.

@miaulalala
Copy link
Contributor Author

This has been discussed an the actual RFC compliant way will be to update the recipient in the iTip Message. Thanks @kesselb for figuring this out!

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and the status was updated correctly for both the organizer and attendee. I didn't look at the code though.

@miaulalala miaulalala closed this Sep 29, 2021
@ChristophWurst ChristophWurst deleted the fix/attendees-not-updated-in-calendar branch September 29, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Participants, once accepted, won't show up as accepted in the event.

7 participants