From da32b3f86d9cb1e730f5fab27d6767498d46167d Mon Sep 17 00:00:00 2001 From: smizrahi Date: Mon, 16 Dec 2024 12:21:41 +0100 Subject: [PATCH] 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. --- SoObjects/Appointments/SOGoAppointmentObject.m | 2 +- SoObjects/Appointments/iCalEntityObject+SOGo.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 0196d4d19..6528e0a6b 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -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. diff --git a/SoObjects/Appointments/iCalEntityObject+SOGo.m b/SoObjects/Appointments/iCalEntityObject+SOGo.m index 26949f88a..65ed31fdf 100644 --- a/SoObjects/Appointments/iCalEntityObject+SOGo.m +++ b/SoObjects/Appointments/iCalEntityObject+SOGo.m @@ -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];