fix(calendar): Ensure organizers are properly removed from attendee's calendars. Fix issue where organizers were also set as attendees. Removed organizer in attendees list.

This commit is contained in:
smizrahi
2024-12-16 12:21:41 +01:00
parent a09720cf22
commit da32b3f86d
2 changed files with 2 additions and 2 deletions
@@ -1859,7 +1859,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
// Retrieve this occurence ID.
recurrenceId = [occurence recurrenceId];
if ([occurence userIsAttendee: ownerUser] && !activeUserIsOwner)
if ([occurence userIsAttendee: ownerUser])
{
// The current user deletes the occurence; let the organizer know that
// the user has declined this occurence.
@@ -379,7 +379,7 @@ NSNumber *iCalDistantFutureNumber = nil;
currentAttendee = [attendees nextObject];
while (!isAttendee
&& currentAttendee)
if ([user hasEmail: [currentAttendee rfc822Email]])
if ([user hasEmail: [currentAttendee rfc822Email]] && ![self isOrganizer:[currentAttendee rfc822Email]]) // Exclude organizer if in attendees
isAttendee = YES;
else
currentAttendee = [attendees nextObject];