feat(core): Allow the detection of external Sieve scripts

This allows SOGo users to keep existing Sieve scripts instead of
overwriting the SOGo ones by default.
This commit is contained in:
Ludovic Marcotte committed 2019-11-07 15:18:28 -05:00
1 parent 70984def1f
commit ac91a303c9
5 files changed
+134 -60

No files matched your search

+19
View File
@@ -728,6 +728,25 @@ static NSArray *reminderValues = nil;
return [[user domainDefaults] sieveScriptsEnabled];
}
- (NSString *) hasActiveExternalSieveScripts
{
NSDictionary *scripts;
NSEnumerator *keys;
NSString *key;
scripts = [[self _sieveClient] listScripts];
keys = [scripts keyEnumerator];
while ((key = [keys nextObject]))
{
if ([key caseInsensitiveCompare: @"sogo"] != NSOrderedSame &&
[[scripts objectForKey: key] boolValue])
return @"true";
}
return @"false";
}
//
// Used by wox template
//