pull/69/merge
Ludovic Marcotte 2015-02-05 11:14:53 -05:00
parent 923bcf8ae2
commit eca22caefc
2 changed files with 10 additions and 2 deletions

1
NEWS
View File

@ -3,6 +3,7 @@
Bug fixes
- (regression) fixed sending a message when mail module is not active (#3088)
- mail lables with blanks are not handled correctly (#3078)
2.2.15 (2015-01-30)
-------------------

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]];