This commit is contained in:
Ludovic Marcotte
2015-02-05 11:14:53 -05:00
parent 923bcf8ae2
commit eca22caefc
2 changed files with 10 additions and 2 deletions
+9 -2
View File
@@ -712,19 +712,26 @@
WORequest *request;
SOGoMailFolder *co;
NSException *error;
NSArray *msgUIDs, *flags;
NSArray *msgUIDs;
NSMutableArray *flags;
NSString *operation;
NSDictionary *content, *result;
BOOL addOrRemove;
NGImap4Client *client;
int i;
request = [context request];
content = [[request contentAsString] objectFromJSONString];
flags = [NSArray arrayWithObject:[content objectForKey:@"flags"]];
flags = [NSMutableArray arrayWithObject:[content objectForKey:@"flags"]];
msgUIDs = [NSArray arrayWithArray:[content objectForKey:@"msgUIDs"]];
operation = [content objectForKey:@"operation"];
addOrRemove = ([operation isEqualToString:@"add"]? YES: NO);
// We unescape our flags
for (i = [flags count]-1; i >= 0; i--)
[flags replaceObjectAtIndex: i withObject: [[flags objectAtIndex: i] fromCSSIdentifier]];
co = [self clientObject];
client = [[co imap4Connection] client];
[[co imap4Connection] selectFolder: [co imap4URL]];