mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-07 04:25:26 +00:00
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:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user