mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-06 22:08:51 +00:00
Fix behaviour of return receipt actions
This commit is contained in:
1
NEWS
1
NEWS
@@ -15,6 +15,7 @@ Bug fixes
|
||||
- [web] fixed display of multi-days events when some weekdays are disabled
|
||||
- [web] fixed synchronisation of calendar categories
|
||||
- [web] fixed popup window detection in message viewer (#4518)
|
||||
- [web] fixed behaviour of return receipt actions
|
||||
|
||||
4.0.2 (2018-08-24)
|
||||
------------------
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
$label3 = ("Personal", "#009900");
|
||||
$label4 = ("To Do", "#3333FF");
|
||||
$label5 = ("Later", "#993399");
|
||||
$mdnsent = ("Return Receipt Sent", "#006600");
|
||||
};
|
||||
|
||||
SOGoCalendarCategories = (
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
"Personal" = "Personal";
|
||||
"To Do" = "To Do";
|
||||
"Later" = "Later";
|
||||
"Return Receipt Sent" = "Return Receipt Sent";
|
||||
"a2_Sunday" = "Su";
|
||||
"a2_Monday" = "Mo";
|
||||
"a2_Tuesday" = "Tu";
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
- (BOOL) mailIsDraft;
|
||||
- (NSNumber *) shouldAskReceipt;
|
||||
- (NSString *) formattedDate;
|
||||
- (NSString *) _matchingIdentityEMailOrDefault: (BOOL) useDefault;
|
||||
|
||||
@end
|
||||
|
||||
@@ -421,14 +422,21 @@ static NSString *mailETag = nil;
|
||||
}
|
||||
|
||||
- (NSString *) _matchingIdentityEMail
|
||||
{
|
||||
return [self _matchingIdentityEMailOrDefault: YES];
|
||||
}
|
||||
|
||||
- (NSString *) _matchingIdentityEMailOrDefault: (BOOL) useDefault
|
||||
{
|
||||
NSMutableArray *recipients;
|
||||
NSArray *headerRecipients;
|
||||
NSString *currentEMail;
|
||||
NSString *currentEMail, *email;
|
||||
NGImap4EnvelopeAddress *address;
|
||||
NSInteger count, max;
|
||||
SOGoMailObject *co;
|
||||
|
||||
email = nil;
|
||||
|
||||
if (!matchingIdentityEMail)
|
||||
{
|
||||
recipients = [NSMutableArray array];
|
||||
@@ -453,18 +461,21 @@ static NSString *mailETag = nil;
|
||||
[matchingIdentityEMail retain];
|
||||
}
|
||||
}
|
||||
|
||||
if (!matchingIdentityEMail)
|
||||
{
|
||||
// This can happen if we receive the message because we are
|
||||
// in the list of bcc. In this case, we take the first
|
||||
// identity associated with the account.
|
||||
matchingIdentityEMail = [[[[[self clientObject] mailAccountFolder] identities] lastObject] objectForKey: @"email"];
|
||||
RETAIN(matchingIdentityEMail);
|
||||
}
|
||||
}
|
||||
|
||||
return matchingIdentityEMail;
|
||||
if (matchingIdentityEMail)
|
||||
{
|
||||
email = matchingIdentityEMail;
|
||||
}
|
||||
else if (useDefault)
|
||||
{
|
||||
// This can happen if we receive the message because we are
|
||||
// in the list of bcc. In this case, we take the first
|
||||
// identity associated with the account.
|
||||
email = [[[[[self clientObject] mailAccountFolder] identities] objectAtIndex: 0] objectForKey: @"email"];
|
||||
}
|
||||
|
||||
return email;
|
||||
}
|
||||
|
||||
- (NSString *) _domainFromEMail: (NSString *) email
|
||||
@@ -531,7 +542,7 @@ static NSString *mailETag = nil;
|
||||
ud = [[context activeUser] userDefaults];
|
||||
if ([ud allowUserReceipt])
|
||||
{
|
||||
if ([self _matchingIdentityEMail])
|
||||
if ([self _matchingIdentityEMailOrDefault: NO])
|
||||
{
|
||||
if ([self _senderIsInUserDomain: headers])
|
||||
action = [ud userReceiptAnyAction];
|
||||
@@ -723,7 +734,6 @@ static NSString *mailETag = nil;
|
||||
if ([action isEqualToString: @"ask"])
|
||||
{
|
||||
shouldAskReceipt = [NSNumber numberWithBool: YES];
|
||||
[self _flagMessageWithMDNSent];
|
||||
}
|
||||
else if ([action isEqualToString: @"send"])
|
||||
[self _sendEMailReceiptTo: email];
|
||||
|
||||
Reference in New Issue
Block a user