Monotone-Parent: 6eb7b1decc1399095693d1c51a865af87262f1de

Monotone-Revision: d58f9b1f1a39247ba47780a3deea01d36ebe1402

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-10T14:59:03
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-07-10 14:59:03 +00:00
parent 85a81bb9d0
commit d253589ee0
6 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,10 @@
2008-07-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoCalendarComponent.m
([SOGoCalendarComponent -sendResponseTo:recipient]): method
renamed from 'sendResponseToOrganizer' and which now takes an
optional argument indicating the recipient of the REPLY.
2008-07-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolders.m ([SOGoAppointmentFolders -davCreateCalendarCollection:newNameinContext:createContext]):

View File

@ -390,7 +390,7 @@
{
if ([[attendee rsvp] isEqualToString: @"true"]
&& [event isStillRelevant])
[self sendResponseToOrganizer];
[self sendResponseTo: nil];
organizerUID = [[event organizer] uid];
if (organizerUID)
ex = [self _updateAttendee: attendee
@ -533,9 +533,7 @@
[recipientEvent takeAttendeeStatus: attendee];
}
#warning fix this when sendEmailUsing blabla has been cleaned up
[self sendEMailUsingTemplateNamed: @"ICalReply"
forOldObject: nil andNewObject: event
toAttendees: [NSArray arrayWithObject: person]];
[self sendResponseTo: person];
[person release];
[elements
addObject: [self _caldavSuccessCodeWithRecipient: recipient]];

View File

@ -55,7 +55,7 @@
forOldObject: (iCalRepeatableEntityObject *) _oldObject
andNewObject: (iCalRepeatableEntityObject *) _newObject
toAttendees: (NSArray *) _attendees;
- (void) sendResponseToOrganizer;
- (void) sendResponseTo: (iCalPerson *) recipient;
// - (BOOL) isOrganizerOrOwner: (SOGoUser *) user;

View File

@ -373,11 +373,11 @@ static BOOL sendEMailNotifications = NO;
}
}
- (void) sendResponseToOrganizer
- (void) sendResponseTo: (iCalPerson *) recipient
{
NSString *pageName, *language, *mailDate, *email;
WOApplication *app;
iCalPerson *organizer, *attendee;
iCalPerson *attendee;
NSString *iCalString;
iCalEvent *event;
SOGoAptMailICalReply *p;
@ -392,7 +392,8 @@ static BOOL sendEMailNotifications = NO;
event = [[self component: NO secure: NO] itipEntryWithMethod: @"reply"];
if (![event userIsOrganizer: [context activeUser]])
{
organizer = [event organizer];
if (!recipient)
recipient = [event organizer];
attendee = [event findParticipant: [context activeUser]];
[event setAttendees: [NSArray arrayWithObject: attendee]];
@ -418,14 +419,14 @@ static BOOL sendEMailNotifications = NO;
*/
[headerMap setObject: @"multipart/mixed" forKey: @"content-type"];
[headerMap setObject: [attendee mailAddress] forKey: @"from"];
[headerMap setObject: [organizer mailAddress] forKey: @"to"];
[headerMap setObject: [recipient mailAddress] forKey: @"to"];
mailDate = [[NSCalendarDate date] rfc822DateString];
[headerMap setObject: mailDate forKey: @"date"];
[headerMap setObject: [p getSubject] forKey: @"subject"];
msg = [NGMimeMessage messageWithHeader: headerMap];
NSLog (@"sending 'REPLY' from %@ to %@",
[attendee mailAddress], [organizer mailAddress]);
[attendee mailAddress], [recipient mailAddress]);
/* multipart body */
body = [[NGMimeMultipartBody alloc] initWithPart: msg];
@ -457,7 +458,7 @@ static BOOL sendEMailNotifications = NO;
[body release];
/* send the damn thing */
email = [organizer rfc822Email];
email = [recipient rfc822Email];
[[SOGoMailer sharedMailer]
sendMimePart: msg
toRecipients: [NSArray arrayWithObject: email]

View File

@ -28,6 +28,7 @@
JournalItems IPF.Journal */
#import <Foundation/NSArray.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <Foundation/NSEnumerator.h>

View File

@ -217,7 +217,7 @@
rsvp = nil;
[eventObject saveContentString: [calendar versitString]];
if ([rsvp isEqualToString: @"true"])
[eventObject sendResponseToOrganizer];
[eventObject sendResponseTo: nil];
organizerUID = [[chosenEvent organizer] uid];
if (organizerUID)
[self _updateAttendee: user withSequence: [chosenEvent sequence]