Skip to content

Commit

Permalink
fix(calendar): set missing RSVP parameter to TRUE for attendees
Browse files Browse the repository at this point in the history
This is not the expected behaviour defined in the RFC, but it's more
convenient for users.
  • Loading branch information
cgx committed Apr 19, 2022
1 parent a0f6842 commit 2676aa9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions SoObjects/Appointments/SOGoAppointmentObject.m
Original file line number Diff line number Diff line change
Expand Up @@ -1900,8 +1900,8 @@ - (void) _adjustTransparencyInRequestCalendar: (iCalCalendar *) rqCalendar
}

//
// iOS devices (and potentially others) send event invitations with no PARTSTAT defined.
// This confuses DAV clients like Thunderbird, or event SOGo web. The RFC says:
// [1] iOS devices (and potentially others) send event invitations with no PARTSTAT defined.
// This confuses DAV clients like Thunderbird, or even SOGo web. RFC 5545 says:
//
// Description: This parameter can be specified on properties with a
// CAL-ADDRESS value type. The parameter identifies the participation
Expand All @@ -1912,6 +1912,11 @@ - (void) _adjustTransparencyInRequestCalendar: (iCalCalendar *) rqCalendar
// not specified on a property that allows this parameter, the default
// value is NEEDS-ACTION.
//
// [2] Thunderbird (and potentially others) send event invitations with no RSVP defined.
// Without any RSVP, the Web interface won't allow the user to respond to the invitation.
// For this reason, we set it to TRUE when missing, even though RFC 5545 says the default
// value is FALSE.
//
- (void) _adjustPartStatInRequestCalendar: (iCalCalendar *) rqCalendar
{
NSArray *allObjects, *allAttendees;
Expand All @@ -1936,6 +1941,8 @@ - (void) _adjustPartStatInRequestCalendar: (iCalCalendar *) rqCalendar

if (![[attendee partStat] length])
[attendee setPartStat: @"NEEDS-ACTION"];
if (![[attendee rsvp] length])
[attendee setRsvp: @"TRUE"];
}
}
}
Expand Down

0 comments on commit 2676aa9

Please sign in to comment.