mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 10:25:27 +00:00
fix(calendar): Fix inaccessibility to personal calendar on Mac OS X Ventura. Fixes #5639
This commit is contained in:
@@ -431,6 +431,12 @@ static NSArray *childRecordFields = nil;
|
||||
|
||||
cache = [SOGoCache sharedCache];
|
||||
record = [[cache valueForKey: _path] objectFromJSONString];
|
||||
// FIXME: Improve MacOSX Ventura support
|
||||
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
|
||||
// Ticket #5639
|
||||
if ([[context request] isMacOSXVenturaCalendarApp]) {
|
||||
_path = [_path stringByReplacingOccurrencesOfString:@"Personal" withString:@"personal"];
|
||||
}
|
||||
|
||||
// We check if we got a cache miss or a potentially bogus
|
||||
// entry from the cache
|
||||
|
||||
@@ -221,10 +221,21 @@ static SoSecurityManager *sm = nil;
|
||||
while ((row = [fc fetchAttributes: attrs withZone: NULL]))
|
||||
{
|
||||
key = [row objectForKey: @"c_path4"];
|
||||
// FIXME: Improve MacOSX Ventura support
|
||||
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
|
||||
// Ticket #5639
|
||||
if ([[context request] isMacOSXVenturaCalendarApp]) {
|
||||
if ([key isEqualToString:@"personal"]) {
|
||||
key = @"Personal";
|
||||
}
|
||||
}
|
||||
|
||||
if ([key isKindOfClass: [NSString class]])
|
||||
{
|
||||
folder = [subFolderClass objectWithName: key inContainer: self];
|
||||
[folder setOCSPath: [NSString stringWithFormat: @"%@/%@", OCSPath, key]];
|
||||
[folder setOCSPath: [NSString stringWithFormat: @"%@/%@", OCSPath, key]];
|
||||
|
||||
if (folder)
|
||||
[subFolders setObject: folder forKey: key];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
- (BOOL) isICal;
|
||||
- (BOOL) isICal4;
|
||||
- (BOOL) isMacOSXAddressBookApp;
|
||||
- (BOOL) isIPhoneAddressBookApp;
|
||||
- (BOOL)isMacOSXCalendarApp;
|
||||
- (BOOL)isIPhoneAddressBookApp;
|
||||
- (BOOL) isAndroid;
|
||||
|
||||
@end
|
||||
|
||||
@@ -242,5 +242,21 @@
|
||||
return ([[cc userAgent] rangeOfString: @"Android"].location != NSNotFound);
|
||||
}
|
||||
|
||||
- (BOOL) isMacOSXVenturaCalendarApp
|
||||
{
|
||||
WEClientCapabilities *cc;
|
||||
BOOL b;
|
||||
|
||||
cc = [self clientCapabilities];
|
||||
|
||||
b = (
|
||||
(
|
||||
[[cc userAgent] rangeOfString: @"macOS/13"].location != NSNotFound
|
||||
&& [[cc userAgent] rangeOfString: @"dataaccessd"].location != NSNotFound
|
||||
)
|
||||
);
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user