mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-24 07:32:44 +00:00
Monotone-Parent: 792be98e654b3cfa62f4f11c932b36e8f665af0d
Monotone-Revision: c98770f24cfa85b41238be62c18aeaad6380a583 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-12T19:56:20 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -252,36 +252,32 @@
|
||||
uid = [self getUIDForICalPerson: organizer];
|
||||
if (!uid)
|
||||
uid = [self ownerInContext: nil];
|
||||
if (uid) {
|
||||
if (![storeUIDs containsObject:uid])
|
||||
[storeUIDs addObject:uid];
|
||||
[removedUIDs removeObject:uid];
|
||||
}
|
||||
if (uid)
|
||||
{
|
||||
[storeUIDs addObjectUniquely: uid];
|
||||
[removedUIDs removeObject: uid];
|
||||
}
|
||||
|
||||
/* organizer might have changed completely */
|
||||
|
||||
if (oldApt && ([props containsObject: @"organizer"])) {
|
||||
uid = [self getUIDForICalPerson:[oldApt organizer]];
|
||||
if (uid) {
|
||||
if (![storeUIDs containsObject:uid]) {
|
||||
if (![removedUIDs containsObject:uid]) {
|
||||
[removedUIDs addObject:uid];
|
||||
}
|
||||
}
|
||||
if (oldApt && ([props containsObject: @"organizer"]))
|
||||
{
|
||||
uid = [self getUIDForICalPerson: [oldApt organizer]];
|
||||
if (uid && ![storeUIDs containsObject: uid])
|
||||
[removedUIDs addObjectUniquely: uid];
|
||||
}
|
||||
}
|
||||
|
||||
[self debugWithFormat:@"UID ops:\n store: %@\n remove: %@",
|
||||
[self debugWithFormat: @"UID ops:\n store: %@\n remove: %@",
|
||||
storeUIDs, removedUIDs];
|
||||
|
||||
/* if time did change, all participants have to re-decide ...
|
||||
* ... exception from that rule: the organizer
|
||||
*/
|
||||
|
||||
if (oldApt != nil &&
|
||||
([props containsObject: @"startDate"] ||
|
||||
[props containsObject: @"endDate"] ||
|
||||
[props containsObject: @"duration"]))
|
||||
if (oldApt
|
||||
&& ([props containsObject: @"startDate"]
|
||||
|| [props containsObject: @"endDate"]
|
||||
|| [props containsObject: @"duration"]))
|
||||
{
|
||||
NSArray *ps;
|
||||
unsigned i, count;
|
||||
@@ -320,15 +316,16 @@
|
||||
andNewObject: newApt
|
||||
toAttendees: attendees];
|
||||
|
||||
if (updateForcesReconsider) {
|
||||
attendees = [NSMutableArray arrayWithArray:[newApt attendees]];
|
||||
[attendees removeObjectsInArray:[changes insertedAttendees]];
|
||||
[attendees removePerson:organizer];
|
||||
[self sendEMailUsingTemplateNamed: @"Update"
|
||||
forOldObject: oldApt
|
||||
andNewObject: newApt
|
||||
toAttendees: attendees];
|
||||
}
|
||||
if (updateForcesReconsider)
|
||||
{
|
||||
attendees = [NSMutableArray arrayWithArray:[newApt attendees]];
|
||||
[attendees removeObjectsInArray:[changes insertedAttendees]];
|
||||
[attendees removePerson:organizer];
|
||||
[self sendEMailUsingTemplateNamed: @"Update"
|
||||
forOldObject: oldApt
|
||||
andNewObject: newApt
|
||||
toAttendees: attendees];
|
||||
}
|
||||
|
||||
attendees
|
||||
= [NSMutableArray arrayWithArray: [changes deletedAttendees]];
|
||||
@@ -393,8 +390,8 @@
|
||||
&& [self _aptIsStillRelevant: apt])
|
||||
{
|
||||
/* send notification email to attendees excluding organizer */
|
||||
attendees = [NSMutableArray arrayWithArray:[apt attendees]];
|
||||
[attendees removePerson:[apt organizer]];
|
||||
attendees = [NSMutableArray arrayWithArray: [apt attendees]];
|
||||
[attendees removePerson: [apt organizer]];
|
||||
|
||||
/* flag appointment as being cancelled */
|
||||
[(iCalCalendar *) [apt parent] setMethod: @"cancel"];
|
||||
|
||||
Reference in New Issue
Block a user