Monotone-Parent: b98feac746b0ff0001fe777c4f71e1930b761a59

Monotone-Revision: fd17d1db3508a9f1ae745c58c00d732b0459740e

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-11-28T19:54:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle committed 2008-11-28 19:54:51 +00:00
1 parent 6834135f25
commit 166213933f
1 file changed
+9 -5
@@ -348,18 +348,16 @@
if ([newEvent userIsOrganizer: ownerUser])
{
oldEvent = [self component: NO secure: NO];
if (oldEvent)
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
else
if ([self isNew])
{
// New event -- send invitation to all attendees
attendees = [newEvent attendeesWithoutUser: ownerUser];
if ([attendees count])
{
[self _handleAddedUsers: attendees fromEvent: newEvent];
[self sendEMailUsingTemplateNamed: @"Invitation"
forObject: [newEvent itipEntryWithMethod: @"request"]
previousObject: oldEvent
previousObject: nil
toAttendees: attendees];
}
@@ -367,6 +365,12 @@
[[newEvent uniqueChildWithTag: @"organizer"] setValue: 0
to: @""];
}
else
{
// Event is modified -- sent update status to all attendees
oldEvent = [self component: NO secure: NO];
[self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent];
}
}
[super saveComponent: newEvent];