Skip to content
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

Scheduling plugin not updating responding attendee status #28094

Closed
wants to merge 1 commit into from

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
Signed-off-by: Anna Larch <anna@nextcloud.com>
@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 = alice@example.org and recipient = organizer@example.org. The event for recipient organizer@example.org is selected and the attendance status for alice@example.org 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.

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.
6 participants