mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Monotone-Parent: 09fd3c049d8fce6a780967f22bad7504e5227848
Monotone-Revision: dce141ada92f68343c2d1685722e6b8c8182168b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-03-08T13:35:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2011-03-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreCalendarMessage.m (-save): accept entries
|
||||
with an "x500dn" record since they are now properly converted.
|
||||
|
||||
* OpenChange/MAPIStoreContext.m (_convertRecipientFromRow:):
|
||||
properly find out the coordinates of internal users.
|
||||
|
||||
2011-03-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreFSFolder.m (-createMessage): fixed typo that
|
||||
|
||||
@@ -308,8 +308,7 @@
|
||||
[person setRole: @"REQ-PARTICIPANT"];
|
||||
|
||||
// FIXME: We must NOT always rely on this
|
||||
if (![dict objectForKey: @"x500dn"]
|
||||
&& ![vEvent isAttendee: [person rfc822Email]])
|
||||
if (![vEvent isAttendee: [person rfc822Email]])
|
||||
[vEvent addToAttendees: person];
|
||||
|
||||
[person release];
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
|
||||
#import "SOGoMAPIFSFolder.h"
|
||||
#import "SOGoMAPIFSMessage.h"
|
||||
|
||||
@@ -1071,6 +1073,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
{
|
||||
NSMutableDictionary *recipient;
|
||||
NSString *value;
|
||||
SOGoUser *recipientUser;
|
||||
|
||||
recipient = [NSMutableDictionary dictionaryWithCapacity: 5];
|
||||
|
||||
@@ -1078,37 +1081,50 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
|
||||
{
|
||||
value = [NSString stringWithUTF8String: row->X500DN.recipient_x500name];
|
||||
[recipient setObject: value forKey: @"x500dn"];
|
||||
}
|
||||
|
||||
switch ((row->RecipientFlags & 0x208))
|
||||
{
|
||||
case 0x08:
|
||||
// TODO: we cheat
|
||||
value = [NSString stringWithUTF8String: row->EmailAddress.lpszA];
|
||||
break;
|
||||
case 0x208:
|
||||
value = [NSString stringWithUTF8String: row->EmailAddress.lpszW];
|
||||
break;
|
||||
default:
|
||||
value = nil;
|
||||
recipientUser = [SOGoUser userWithLogin: [value lowercaseString]];
|
||||
if (recipientUser)
|
||||
{
|
||||
value = [recipientUser cn];
|
||||
if ([value length] > 0)
|
||||
[recipient setObject: value forKey: @"fullName"];
|
||||
value = [[recipientUser allEmails] objectAtIndex: 0];
|
||||
if ([value length] > 0)
|
||||
[recipient setObject: value forKey: @"email"];
|
||||
}
|
||||
}
|
||||
if (value)
|
||||
[recipient setObject: value forKey: @"email"];
|
||||
|
||||
switch ((row->RecipientFlags & 0x210))
|
||||
else
|
||||
{
|
||||
case 0x10:
|
||||
// TODO: we cheat
|
||||
value = [NSString stringWithUTF8String: row->DisplayName.lpszA];
|
||||
break;
|
||||
case 0x210:
|
||||
value = [NSString stringWithUTF8String: row->DisplayName.lpszW];
|
||||
break;
|
||||
default:
|
||||
value = nil;
|
||||
switch ((row->RecipientFlags & 0x208))
|
||||
{
|
||||
case 0x08:
|
||||
// TODO: we cheat
|
||||
value = [NSString stringWithUTF8String: row->EmailAddress.lpszA];
|
||||
break;
|
||||
case 0x208:
|
||||
value = [NSString stringWithUTF8String: row->EmailAddress.lpszW];
|
||||
break;
|
||||
default:
|
||||
value = nil;
|
||||
}
|
||||
if (value)
|
||||
[recipient setObject: value forKey: @"email"];
|
||||
|
||||
switch ((row->RecipientFlags & 0x210))
|
||||
{
|
||||
case 0x10:
|
||||
// TODO: we cheat
|
||||
value = [NSString stringWithUTF8String: row->DisplayName.lpszA];
|
||||
break;
|
||||
case 0x210:
|
||||
value = [NSString stringWithUTF8String: row->DisplayName.lpszW];
|
||||
break;
|
||||
default:
|
||||
value = nil;
|
||||
}
|
||||
if (value)
|
||||
[recipient setObject: value forKey: @"fullName"];
|
||||
}
|
||||
if (value)
|
||||
[recipient setObject: value forKey: @"fullName"];
|
||||
|
||||
return recipient;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user