See ChangeLog.

Monotone-Parent: 468e7e6366c0f335fea6ffbfbc6ecf9ab41aaa77
Monotone-Revision: c241a8e1e716fa0db3e4f4e370c051096cc2c3e2

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-01-12T20:52:14
This commit is contained in:
Francis Lachapelle
2012-01-12 20:52:14 +00:00
parent e5d9676c06
commit 84909dd628
3 changed files with 36 additions and 1 deletions
+22 -1
View File
@@ -61,6 +61,7 @@
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserManager.h>
#import <SOGo/SOGoSource.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/WOResourceManager+SOGo.h>
@@ -248,9 +249,12 @@ iRANGE(2);
{
NSEnumerator *attendees;
NSMutableDictionary *currentAttendeeData;
NSString *uid, *domain;
NSArray *contacts;
NSDictionary *contact;
iCalPerson *currentAttendee;
NSString *uid;
SOGoUserManager *um;
NSObject <SOGoSource> *source;
jsonAttendees = [NSMutableDictionary new];
um = [SOGoUserManager sharedUserManager];
@@ -271,6 +275,23 @@ iRANGE(2);
if (uid != nil)
[currentAttendeeData setObject: uid
forKey: @"uid"];
else
{
domain = [[context activeUser] domain];
contacts = [um fetchContactsMatching: [currentAttendee rfc822Email] inDomain: domain];
if ([contacts count] == 1)
{
contact = [contacts lastObject];
source = [contact objectForKey: @"source"];
if ([source conformsToProtocol: @protocol (SOGoDNSource)] &&
[[(NSObject <SOGoDNSource>*) source MSExchangeHostname] length])
{
uid = [NSString stringWithFormat: @"%@:%@", [[context activeUser] login],
[contact valueForKey: @"c_uid"]];
[currentAttendeeData setObject: uid forKey: @"uid"];
}
}
}
[currentAttendeeData setObject: [[currentAttendee partStat] lowercaseString]
forKey: @"partstat"];