fix(addressbook): import contact lists from LDIF file

Fixes #3260
This commit is contained in:
Francis Lachapelle committed 2021-05-26 17:47:15 -04:00
1 parent 562e3796f8
commit e1d8d70e28
8 files changed
+277 -36

No files matched your search

+21 -1
View File
@@ -1,6 +1,6 @@
/* SOGoContactLDIFEntry.m - this file is part of SOGo
*
* Copyright (C) 2006-2017 Inverse inc.
* Copyright (C) 2006-2021 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
#import <SOGo/SOGoPermissions.h>
#import "NGVCard+SOGo.h"
#import "NGVList+SOGo.h"
#import "SOGoContactEntryPhoto.h"
#import "SOGoContactGCSEntry.h"
#import "SOGoContactLDIFEntry.h"
@@ -76,6 +77,11 @@
isNew = newIsNew;
}
- (BOOL) isList
{
return [ldifEntry objectForKey: @"member"] != nil;
}
- (NSString *) contentAsString
{
return [[self vCard] versitString];
@@ -94,6 +100,20 @@
return vcard;
}
- (NGVList *) vList
{
NGVList *vlist;
vlist = [NGVList listWithUid: [self nameInContainer]];
[vlist setProdID: [NSString
stringWithFormat: @"-//Inverse inc./SOGo %@//EN",
SOGoVersion]];
[vlist updateFromLDIFRecord: [self ldifRecord]
inContainer: container];
return vlist;
}
- (BOOL) isFolderish
{
return NO;