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 #28997

Merged
merged 2 commits into from
Oct 22, 2021

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Sep 29, 2021

Take 2 on fixing the attendee's own status not updating.

Thanks to @kesselb we now know the correct way to create an iTip message.

From his comment on the other PR: #28094

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']; 

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.

Fixes nextcloud/calendar#2861

@miaulalala miaulalala added bug 3. to review Waiting for reviews labels Sep 29, 2021
@miaulalala miaulalala self-assigned this Sep 29, 2021
@miaulalala
Copy link
Contributor Author

/backport to stable22

@miaulalala
Copy link
Contributor Author

/backport to stable21

@miaulalala
Copy link
Contributor Author

/backport to stable20

@ChristophWurst

This comment has been minimized.

Signed-off-by: Anna Larch <anna@nextcloud.com>
@kesselb kesselb force-pushed the fix/set-attendee-as-recipient branch from 21c0460 to 817e7a9 Compare October 8, 2021 14:35
For local users it's possible to select their calendar via the principal url and first update their own attendance status.
External users have no calendar event hence the recipient is the organizer.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the fix/set-attendee-as-recipient branch from 817e7a9 to fab887c Compare October 8, 2021 16:12
@miaulalala miaulalala requested review from a team and tcitworld October 13, 2021 09:23
@ChristophWurst ChristophWurst added this to the Nextcloud 23 milestone Oct 18, 2021
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 just tested it on my local instance and it worked great.

I tested using a second local user and an external email address. The status in my calendar and in the shared event of the second user were updated properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
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.
5 participants