diff --git a/ChangeLog b/ChangeLog index e48fa0fdb..eccb60edb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-08-15 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailAccount.m + (-toManyRelationshipKeysWithNamespaces:): new method, superseding + "toManyRelationshipKeys" that enables the returning of namespaces + "folders" or not. + * OpenChange/MAPIStoreMailMessage.m (-objectVersion): updated code as in MAPIStoreGCSMessage's version. diff --git a/SoObjects/Mailer/SOGoMailAccount.h b/SoObjects/Mailer/SOGoMailAccount.h index 6ad08bb42..bec7a5e9e 100644 --- a/SoObjects/Mailer/SOGoMailAccount.h +++ b/SoObjects/Mailer/SOGoMailAccount.h @@ -77,6 +77,7 @@ typedef enum { - (NSString *) encryption; /* folder pathes */ +- (NSArray *) toManyRelationshipKeysWithNamespaces: (BOOL) withNSs; - (NSArray *) allFolderPaths; - (BOOL) isInDraftsFolder; diff --git a/SoObjects/Mailer/SOGoMailAccount.m b/SoObjects/Mailer/SOGoMailAccount.m index f948942ec..6a3bd5c24 100644 --- a/SoObjects/Mailer/SOGoMailAccount.m +++ b/SoObjects/Mailer/SOGoMailAccount.m @@ -174,21 +174,37 @@ static NSString *inboxFolderName = @"INBOX"; return [self _namespacesWithKey: @"shared"]; } -- (NSArray *) toManyRelationshipKeys +- (NSArray *) toManyRelationshipKeysWithNamespaces: (BOOL) withNSs { NSMutableArray *folders; - NSArray *imapFolders; + NSArray *imapFolders, *nss; imapFolders = [[self imap4Connection] subfoldersForURL: [self imap4URL]]; folders = [imapFolders mutableCopy]; [folders autorelease]; [folders addObjectUniquely: [self draftsFolderNameInContext: nil]]; - [self _appendNamespaces: folders]; + if (withNSs) + [self _appendNamespaces: folders]; + else + { /* some implementation insist on returning NSs in the list of + folders... */ + nss = [self otherUsersFolderNamespaces]; + if (nss) + [folders removeObjectsInArray: nss]; + nss = [self sharedFolderNamespaces]; + if (nss) + [folders removeObjectsInArray: nss]; + } return [[folders stringsWithFormat: @"folder%@"] resultsOfSelector: @selector (asCSSIdentifier)]; } +- (NSArray *) toManyRelationshipKeys +{ + return [self toManyRelationshipKeysWithNamespaces: YES]; +} + - (SOGoIMAPAclStyle) imapAclStyle { SOGoDomainDefaults *dd;