mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-10 07:48:52 +00:00
(fix) moved the logic for certificate retrieval
This commit is contained in:
@@ -505,6 +505,15 @@ Class SOGoContactSourceFolderK;
|
||||
}
|
||||
|
||||
- (id<SOGoContactObject>) contactForEmail: (NSString *) theEmail
|
||||
{
|
||||
NSArray *allContacts;
|
||||
|
||||
allContacts = [self allContactsFromFilter: theEmail excludeGroups: YES excludeLists: YES];
|
||||
|
||||
return [allContacts lastObject];
|
||||
}
|
||||
|
||||
- (NSData *) certificateForEmail: (NSString *) theEmail
|
||||
{
|
||||
NSDictionary *contact;
|
||||
NSArray *allContacts;
|
||||
@@ -523,16 +532,11 @@ Class SOGoContactSourceFolderK;
|
||||
contactFolder = [self lookupName: [contact objectForKey: @"container"] inContext: context acquire: NO];
|
||||
contactObject = [contactFolder lookupName: [contact objectForKey: @"id"] inContext: context acquire: NO];
|
||||
|
||||
return contactObject;
|
||||
return [[contactObject vCard] certificate];
|
||||
}
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSData *) certificateForEmail: (NSString *) theEmail
|
||||
{
|
||||
return [[[self contactForEmail: theEmail] vCard] certificate];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user