(feat) new junk/not junk capability with generic SMTP integration

Conflicts:

	NEWS
	SoObjects/Mailer/SOGoMailAccount.m
	SoObjects/SOGo/SOGoDefaults.plist
	SoObjects/SOGo/SOGoUser.m
	UI/MailerUI/UIxMailFolderActions.h
	UI/MailerUI/UIxMailFolderActions.m
	UI/MailerUI/product.plist
This commit is contained in:
Ludovic Marcotte
2016-01-22 13:58:45 -05:00
parent 88207d27c4
commit 30377c0fd6
21 changed files with 338 additions and 16 deletions
+37 -1
View File
@@ -1,6 +1,6 @@
/* UIxMailFolderActions.m - this file is part of SOGo
*
* Copyright (C) 2007-2014 Inverse inc.
* Copyright (C) 2007-2016 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -631,6 +631,11 @@
return [self _setFolderPurpose: @"Trash"];
}
- (WOResponse *) setAsJunkFolderAction
{
return [self _setFolderPurpose: @"Junk"];
}
- (WOResponse *) expungeAction
{
SOGoMailAccount *account;
@@ -830,5 +835,36 @@
return response;
}
- (WOResponse *) _markMessagesAsJunkOrNotJunk: (BOOL) isJunk
{
NSDictionary *content;
WOResponse *response;
WORequest *request;
SOGoMailFolder *co;
NSArray *uids;
request = [context request];
content = [[request contentAsString] objectFromJSONString];
uids = [NSArray arrayWithArray: [content objectForKey:@"uids"]];
co = [self clientObject];
if ([co markMessagesAsJunkOrNotJunk: uids junk: isJunk])
response = [self responseWithStatus: 500];
else
response = [self responseWith204];
return response;
}
- (WOResponse *) markMessagesAsJunkAction
{
return [self _markMessagesAsJunkOrNotJunk: YES];
}
- (WOResponse *) markMessagesAsNotJunkAction
{
return [self _markMessagesAsJunkOrNotJunk: NO];
}
@end