(feat) added support for DeletesAsMoves over EAS

Conflicts:

	ActiveSync/SOGoActiveSyncDispatcher+Sync.m
pull/91/head
Ludovic Marcotte 2015-06-22 09:19:54 -04:00
parent efd182f145
commit ac21649633
2 changed files with 13 additions and 1 deletions

View File

@ -475,16 +475,27 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
withType: (SOGoMicrosoftActiveSyncFolderType) theFolderType withType: (SOGoMicrosoftActiveSyncFolderType) theFolderType
inBuffer: (NSMutableString *) theBuffer inBuffer: (NSMutableString *) theBuffer
{ {
id aDelete, sogoObject, value;
NSArray *deletions; NSArray *deletions;
NSString *serverId; NSString *serverId;
id aDelete, sogoObject; BOOL deletesAsMoves, useTrash;
int i; int i;
deletions = (id)[theDocumentElement getElementsByTagName: @"Delete"]; deletions = (id)[theDocumentElement getElementsByTagName: @"Delete"];
if ([deletions count]) if ([deletions count])
{ {
// From the documention, if DeletesAsMoves is missing, we must assume it's a YES.
// See https://msdn.microsoft.com/en-us/library/gg675480(v=exchg.80).aspx for all details.
value = [theDocumentElement getElementsByTagName: @"DeletesAsMoves"];
deletesAsMoves = YES;
useTrash = YES;
if ([value count] && [[[value lastObject] textValue] length])
deletesAsMoves = [[[value lastObject] textValue] boolValue];
for (i = 0; i < [deletions count]; i++) for (i = 0; i < [deletions count]; i++)
{ {
aDelete = [deletions objectAtIndex: i]; aDelete = [deletions objectAtIndex: i];

1
NEWS
View File

@ -5,6 +5,7 @@ Enhancements
- improved EAS speed, especially when fetching big attachments - improved EAS speed, especially when fetching big attachments
- now always enforce the organizer's default identity in appointments - now always enforce the organizer's default identity in appointments
- improved the handling of default calendar categories/colors (#3200) - improved the handling of default calendar categories/colors (#3200)
- added support for DeletesAsMoves over EAS
Bug fixes Bug fixes
- EAS's GetItemEstimate/ItemOperations now support fetching mails and empty folders - EAS's GetItemEstimate/ItemOperations now support fetching mails and empty folders