(fix) Automatic certificate update in Address book

This commit is contained in:
Francis Lachapelle
2018-01-19 13:33:02 -05:00
parent b8c20b24e5
commit b8812d64e8

View File

@@ -507,10 +507,22 @@ Class SOGoContactSourceFolderK;
- (id<SOGoContactObject>) contactForEmail: (NSString *) theEmail
{
NSArray *allContacts;
NSDictionary *contact;
allContacts = [self allContactsFromFilter: theEmail excludeGroups: YES excludeLists: YES];
contact = [allContacts lastObject];
if (contact)
{
SOGoFolder<SOGoContactObject> *contactObject;
SOGoFolder<SOGoContactFolder> *contactFolder;
return [allContacts lastObject];
contactFolder = [self lookupName: [contact objectForKey: @"container"] inContext: context acquire: NO];
contactObject = [contactFolder lookupName: [contact objectForKey: @"id"] inContext: context acquire: NO];
return contactObject;
}
return nil;
}
- (NSData *) certificateForEmail: (NSString *) theEmail