Improve Mail module

- JSONinfied mail folder create and delete actions
- restored sgFolderTree directive
- extended folder types with "shared" and "otherUsers"
- added mailbox creation at the account level
This commit is contained in:
Francis Lachapelle
2015-06-11 15:48:14 -04:00
parent 2d026b5ca5
commit 2d076358d3
8 changed files with 137 additions and 74 deletions
+9 -4
View File
@@ -187,6 +187,7 @@
NGImap4Connection *connection;
NSException *error;
NSURL *srcURL, *destURL;
NSDictionary *jsonResponse;
NSMutableDictionary *moduleSettings, *threadsCollapsed;
NSString *currentMailbox, *currentAccount, *keyForMsgUIDs;
@@ -202,8 +203,10 @@
error = [connection moveMailboxAtURL: srcURL toURL: destURL];
if (error)
{
response = [self responseWithStatus: 500];
[response appendContentString: @"Unable to move folder."];
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Unable to move folder."]
forKey: @"error"];
response = [self responseWithStatus: 500
andString: [jsonResponse jsonRepresentation]];
}
else
{
@@ -232,8 +235,10 @@
}
else
{
response = [self responseWithStatus: 500];
[response appendContentString: @"Unable to move folder."];
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Unable to move folder."]
forKey: @"error"];
response = [self responseWithStatus: 500
andString: [jsonResponse jsonRepresentation]];
}
return response;