Monotone-Parent: 0876527d52dfa5e4ddfcb4dee4220d4d6bd27eec

Monotone-Revision: 4fc05589d27078390d22daa4cafe9389c886c583

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-12-01T22:30:25
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-12-01 22:30:25 +00:00
parent 4641b917c7
commit 8bf49a0d2f
2 changed files with 23 additions and 7 deletions

View File

@ -1,5 +1,12 @@
2011-12-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreCalendarMessage.m (-appointmentWrapper):
pass the owner user as parameter to the appointment wrapper
contructor rather than the active user.
(-save): make use of the owner user coordinates instead of the
ones of the active user. Handle the "sent-by" parameter for the
organizer element.
* OpenChange/MAPIStoreFolder.m
(-openMessage:withMID:forWriting:inMemCtx:): takes a new
"forWriting:" parameter and make use of subscriberCanModifyMessage

View File

@ -113,7 +113,7 @@
context = [self context];
ASSIGN (appointmentWrapper,
[MAPIStoreAppointmentWrapper wrapperWithICalEvent: event
andUser: [context activeUser]
andUser: [context ownerUser]
andSenderEmail: nil
inTimeZone: [self ownerTimeZone]
withConnectionInfo: [context connectionInfo]]);
@ -653,7 +653,7 @@
iCalEvent *newEvent;
iCalPerson *userPerson;
NSUInteger responseStatus = 0;
SOGoUser *activeUser;
SOGoUser *activeUser, *ownerUser;
id value;
if (isNew)
@ -684,8 +684,8 @@
vCalendar = [iCalCalendar parseSingleFromSource: content];
newEvent = [[vCalendar events] objectAtIndex: 0];
activeUser = [[self context] activeUser];
userPerson = [newEvent userAsAttendee: activeUser];
ownerUser = [[self context] ownerUser];
userPerson = [newEvent userAsAttendee: ownerUser];
[newEvent setTimeStampAsDate: now];
if (userPerson)
@ -723,7 +723,7 @@
{
// iCalPerson *participant;
// participant = [newEvent userAsAttendee: activeUser];
// participant = [newEvent userAsAttendee: ownerUser];
// [participant setParticipationStatus: newPartStat];
// [sogoObject saveComponent: newEvent];
@ -871,7 +871,7 @@
{
NSArray *recipients;
NSDictionary *dict;
NSString *orgEmail, *attEmail;
NSString *orgEmail, *sentBy, *attEmail;
iCalPerson *person;
iCalPersonPartStat newPartStat;
NSNumber *flags, *trackStatus;
@ -880,11 +880,20 @@
/* We must set the organizer preliminarily here because, unlike what
the doc states, Outlook does not always pass the real organizer
in the recipients list. */
dict = [activeUser primaryIdentity];
dict = [ownerUser primaryIdentity];
person = [iCalPerson new];
[person setCn: [dict objectForKey: @"fullName"]];
orgEmail = [dict objectForKey: @"email"];
[person setEmail: orgEmail];
activeUser = [[self context] activeUser];
if (![activeUser isEqual: ownerUser])
{
dict = [activeUser primaryIdentity];
sentBy = [NSString stringWithFormat: @"mailto:%@",
[dict objectForKey: @"email"]];
[person setSentBy: sentBy];
}
[newEvent setOrganizer: person];
[person release];