(fix) remove attendees that have the same identity of the organizer (fixes #3905)
This commit is contained in:
parent
270ff1bd29
commit
6a963bf84b
|
@ -1817,7 +1817,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||||
{
|
{
|
||||||
NSArray *allEvents;
|
NSArray *allEvents;
|
||||||
iCalEvent *event;
|
iCalEvent *event;
|
||||||
NSUInteger i;
|
NSUInteger i, j;
|
||||||
|
|
||||||
allEvents = [rqCalendar events];
|
allEvents = [rqCalendar events];
|
||||||
|
|
||||||
|
@ -1850,12 +1850,27 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||||
if (uid)
|
if (uid)
|
||||||
{
|
{
|
||||||
NSDictionary *defaultIdentity;
|
NSDictionary *defaultIdentity;
|
||||||
|
NSArray *allAttendees;
|
||||||
|
iCalPerson *attendee;
|
||||||
SOGoUser *organizer;
|
SOGoUser *organizer;
|
||||||
|
|
||||||
|
|
||||||
organizer = [SOGoUser userWithLogin: uid];
|
organizer = [SOGoUser userWithLogin: uid];
|
||||||
defaultIdentity = [organizer defaultIdentity];
|
defaultIdentity = [organizer defaultIdentity];
|
||||||
[[event organizer] setCn: [defaultIdentity objectForKey: @"fullName"]];
|
[[event organizer] setCn: [defaultIdentity objectForKey: @"fullName"]];
|
||||||
[[event organizer] setEmail: [defaultIdentity objectForKey: @"email"]];
|
[[event organizer] setEmail: [defaultIdentity objectForKey: @"email"]];
|
||||||
|
|
||||||
|
// We now check if one of the attendee is also the organizer. If so,
|
||||||
|
// we remove it. See bug #3905 (https://sogo.nu/bugs/view.php?id=3905)
|
||||||
|
// for more details. This is a Calendar app bug on Apple Yosemite.
|
||||||
|
allAttendees = [event attendees];
|
||||||
|
|
||||||
|
for (j = [allAttendees count]-1; j >= 0; j--)
|
||||||
|
{
|
||||||
|
attendee = [allAttendees objectAtIndex: j];
|
||||||
|
if ([organizer hasEmail: [attendee rfc822Email]])
|
||||||
|
[event removeFromAttendees: attendee];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2040,9 +2055,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||||
[self _decomposeGroupsInRequestCalendar: calendar];
|
[self _decomposeGroupsInRequestCalendar: calendar];
|
||||||
|
|
||||||
if ([[ownerUser domainDefaults] iPhoneForceAllDayTransparency] && [rq isIPhone])
|
if ([[ownerUser domainDefaults] iPhoneForceAllDayTransparency] && [rq isIPhone])
|
||||||
{
|
|
||||||
[self _adjustTransparencyInRequestCalendar: calendar];
|
[self _adjustTransparencyInRequestCalendar: calendar];
|
||||||
}
|
|
||||||
|
|
||||||
[self _adjustEventsInRequestCalendar: calendar];
|
[self _adjustEventsInRequestCalendar: calendar];
|
||||||
[self adjustClassificationInRequestCalendar: calendar];
|
[self adjustClassificationInRequestCalendar: calendar];
|
||||||
|
|
Loading…
Reference in a new issue