Skip to content

Commit

Permalink
(feat) newly created folders using EAS are always sync'ed by default …
Browse files Browse the repository at this point in the history
…(#3454)
  • Loading branch information
extrafu committed Jan 25, 2016
1 parent 57901b8 commit 155acfa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
16 changes: 15 additions & 1 deletion ActiveSync/SOGoActiveSyncDispatcher.m
Expand Up @@ -403,17 +403,24 @@ - (void) processFolderCreate: (id <DOMElement>) theDocumentElement
SOGoAppointmentFolders *appointmentFolders;
SOGoCacheGCSObject *o;
NSString *key;
id newFolder;

nameInContainer = nil;

appointmentFolders = [userFolder privateCalendars: @"Calendar" inContext: context];
[appointmentFolders newFolderWithName: displayName
nameInContainer: &nameInContainer];

newFolder = [appointmentFolders lookupName: nameInContainer
inContext: context
acquire: NO];
[newFolder setSynchronize: YES];

if (type == 13)
nameInContainer = [NSString stringWithFormat: @"vevent/%@", nameInContainer];
else
nameInContainer = [NSString stringWithFormat: @"vtodo/%@", nameInContainer];

key = [NSString stringWithFormat: @"%@+%@", [context objectForKey: @"DeviceId"], nameInContainer ];
o = [SOGoCacheGCSObject objectWithName: key inContainer: nil];
[o setObjectType: ActiveSyncFolderCacheObject];
Expand All @@ -428,12 +435,19 @@ - (void) processFolderCreate: (id <DOMElement>) theDocumentElement
SOGoContactFolders *contactFolders;
SOGoCacheGCSObject *o;
NSString *key;
id newFolder;

nameInContainer = nil;

contactFolders = [userFolder privateContacts: @"Contacts" inContext: context];
[contactFolders newFolderWithName: displayName
nameInContainer: &nameInContainer];

newFolder = [contactFolders lookupName: nameInContainer
inContext: context
acquire: NO];
[newFolder setSynchronize: YES];

nameInContainer = [NSString stringWithFormat: @"vcard/%@", nameInContainer];

key = [NSString stringWithFormat: @"%@+%@", [context objectForKey: @"DeviceId"], nameInContainer ];
Expand Down
5 changes: 4 additions & 1 deletion NEWS
Expand Up @@ -4,7 +4,10 @@
New features
- new junk/not junk capability with generic SMTP integration

Buf fixes
Enhancements
- newly created folders using EAS are always sync'ed by default (#3454)

Bug fixes
- now always generate invitation updates when using EAS
- rewrote the string sanitization to be 32-bit Unicode safe

Expand Down

0 comments on commit 155acfa

Please sign in to comment.