Automatically mark msg as read in Mail module

pull/222/head
Francis Lachapelle 2016-09-22 16:08:59 -04:00
parent 0c9a301f25
commit 1c8f309c33
2 changed files with 15 additions and 3 deletions

View File

@ -84,6 +84,18 @@ static BOOL debugSoParts = NO;
}
}
- (id) init
{
if ((self = [super init]))
{
headers = nil;
headerPart = nil;
coreInfos = nil;
}
return self;
}
- (void) dealloc
{
[headers release];

View File

@ -278,9 +278,6 @@ static NSString *mailETag = nil;
andJSONRepresentation: data];
}
// Mark message as read
[co addFlags: @"seen"];
data = [NSMutableDictionary dictionaryWithObjectsAndKeys:
[self attachmentAttrs], @"attachmentAttrs",
[self shouldAskReceipt], @"shouldAskReceipt",
@ -302,6 +299,9 @@ static NSString *mailETag = nil;
if ((addresses = [addressFormatter dictionariesForArray: [co replyToEnvelopeAddresses]]))
[data setObject: addresses forKey: @"reply-to"];
// Mark message as read
[co addFlags: @"seen"];
response = [self responseWithStatus: 200
andJSONRepresentation: data];