mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-12 11:55:09 +00:00
feat(notification): add enotify sieve script
This commit is contained in:
@@ -80,6 +80,9 @@
|
||||
"You are not allowed to forward your messages to an internal email address." = "You are not allowed to forward your messages to an internal email address.";
|
||||
"You are not allowed to forward your messages to this domain:" = "You are not allowed to forward your messages to this domain:";
|
||||
|
||||
/* notification */
|
||||
"Notify incoming messsages" = "Notify incoming messsages";
|
||||
|
||||
/* d & t */
|
||||
"Time Zone" = "Time Zone";
|
||||
"Short Date Format" = "Short Date Format";
|
||||
@@ -411,6 +414,7 @@
|
||||
|
||||
"Keep the message" = "Keep the message";
|
||||
"Forward the message to" = "Forward the message to";
|
||||
"Notify the message to" = "Notify the message to";
|
||||
|
||||
/* Input field label of "forward" mail filter action */
|
||||
"Email" = "Email";
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
= "La date de fin de la réponse automatique doit être dans le futur.";
|
||||
|
||||
/* forward messages */
|
||||
"Forward incoming messages" = "Transférer les messages entrant";
|
||||
"Forward incoming messages" = "Transférer les messages entrants";
|
||||
"Always forward" = "Toujours transférer";
|
||||
"Incoming messages are forwarded prior to apply your filters." = "Le courrier entrant est transféré d'appliquer vos filtres.";
|
||||
"Keep a copy" = "Garder une copie";
|
||||
@@ -80,6 +80,9 @@
|
||||
"You are not allowed to forward your messages to an internal email address." = "Il est interdit de renvoyer vos messages vers une adresse interne.";
|
||||
"You are not allowed to forward your messages to this domain:" = "Vous ne pouvez pas transférer vos messages à ce domaine :";
|
||||
|
||||
/* notify messages */
|
||||
"Notify incoming messsages" = "Notifier les messages entrants";
|
||||
|
||||
/* d & t */
|
||||
"Time Zone" = "Fuseau horaire";
|
||||
"Short Date Format" = "Style de date courte";
|
||||
@@ -411,6 +414,7 @@
|
||||
|
||||
"Keep the message" = "Conserver le message";
|
||||
"Forward the message to" = "Faire suivre le message à";
|
||||
"Notify the message to" = "Notifier le message à";
|
||||
|
||||
/* Input field label of "forward" mail filter action */
|
||||
"Email" = "Email";
|
||||
|
||||
@@ -395,9 +395,14 @@ static SoProduct *preferencesProduct = nil;
|
||||
}
|
||||
|
||||
if ([domainDefaults forwardEnabled] && ![defaults forwardOptions])
|
||||
{
|
||||
[defaults setForwardOptions: [NSDictionary new]];
|
||||
}
|
||||
{
|
||||
[defaults setForwardOptions: [NSDictionary new]];
|
||||
}
|
||||
|
||||
if ([domainDefaults notificationEnabled] && ![defaults notificationOptions])
|
||||
{
|
||||
[defaults setNotificationOptions: [NSDictionary new]];
|
||||
}
|
||||
|
||||
if ([[defaults source] dirty])
|
||||
[defaults synchronize];
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
// Sieve filtering
|
||||
NSArray *daysOfWeek, *daysBetweenResponsesList;
|
||||
NSArray *sieveFilters;
|
||||
NSMutableDictionary *vacationOptions, *forwardOptions;
|
||||
NSMutableDictionary *vacationOptions, *forwardOptions, *notificationOptions;
|
||||
|
||||
BOOL mailCustomFromEnabled;
|
||||
BOOL forwardEnabled;
|
||||
|
||||
@@ -136,13 +136,20 @@ static NSArray *reminderValues = nil;
|
||||
vacationOptions = [NSMutableDictionary new];
|
||||
}
|
||||
|
||||
if ([dd forwardEnabled])
|
||||
if ([dd forwardEnabled])
|
||||
{
|
||||
forwardOptions = [[userDefaults forwardOptions] mutableCopy];
|
||||
if (!forwardOptions)
|
||||
forwardOptions = [NSMutableDictionary new];
|
||||
}
|
||||
|
||||
if ([dd notificationEnabled])
|
||||
{
|
||||
notificationOptions = [[userDefaults notificationOptions] mutableCopy];
|
||||
if (!notificationOptions)
|
||||
notificationOptions = [NSMutableDictionary new];
|
||||
}
|
||||
|
||||
mailCustomFromEnabled = [dd mailCustomFromEnabled];
|
||||
forwardEnabled = [dd forwardEnabled];
|
||||
|
||||
@@ -160,6 +167,7 @@ static NSArray *reminderValues = nil;
|
||||
[sieveFilters release];
|
||||
[vacationOptions release];
|
||||
[forwardOptions release];
|
||||
[notificationOptions release];
|
||||
[daysOfWeek release];
|
||||
[addressBooksIDWithDisplayName release];
|
||||
[client release];
|
||||
@@ -989,6 +997,15 @@ static NSArray *reminderValues = nil;
|
||||
return [domains jsonRepresentation];
|
||||
}
|
||||
|
||||
/* mail notifications */
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
- (BOOL) isNotificationEnabled
|
||||
{
|
||||
return [[user domainDefaults] notificationEnabled];
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
@@ -1727,7 +1744,8 @@ static NSArray *reminderValues = nil;
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
|
||||
// We check if the Sieve server is available *ONLY* if at least one of the option is enabled
|
||||
if (!([dd sieveScriptsEnabled] || [dd vacationEnabled] || [dd forwardEnabled]) || [self _isSieveServerAvailable])
|
||||
if (([dd sieveScriptsEnabled] || [dd vacationEnabled] || [dd forwardEnabled] || [dd notificationEnabled])
|
||||
|| [self _isSieveServerAvailable])
|
||||
{
|
||||
BOOL forceActivation = ![[v objectForKey: @"hasActiveExternalSieveScripts"] boolValue];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user