From 6b08f2e4decc87ee57609355dee5a6657bca6110 Mon Sep 17 00:00:00 2001 From: smizrahi Date: Mon, 13 Nov 2023 23:02:07 +0100 Subject: [PATCH] fix(core): Fix calendar issues with Thunderbird related to vlist exclusion. Fix error log on photo. Closes #5885 --- SoObjects/Contacts/NGVCard+SOGo.m | 2 +- SoObjects/SOGo/SOGoGCSFolder.m | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SoObjects/Contacts/NGVCard+SOGo.m b/SoObjects/Contacts/NGVCard+SOGo.m index d5b5ed8c2..d1be8dccd 100644 --- a/SoObjects/Contacts/NGVCard+SOGo.m +++ b/SoObjects/Contacts/NGVCard+SOGo.m @@ -418,7 +418,7 @@ convention: [self setCategories: [o componentsSeparatedByString: @","]]; // Photo - if ([ldifRecord objectForKey: @"photo"]) + if ([ldifRecord objectForKey: @"photo"] && [ldifRecord objectForKey: @"photo"] != [NSNull null]) [self setPhoto: [[ldifRecord objectForKey: @"photo"] stringByEncodingBase64]]; [self cleanupEmptyChildren]; diff --git a/SoObjects/SOGo/SOGoGCSFolder.m b/SoObjects/SOGo/SOGoGCSFolder.m index 9ff8db637..58a958de8 100644 --- a/SoObjects/SOGo/SOGoGCSFolder.m +++ b/SoObjects/SOGo/SOGoGCSFolder.m @@ -739,7 +739,8 @@ static NSArray *childRecordFields = nil; qualifier = aclQualifier; // For Thunderbird, disable contact list - if ([[context request] isThunderbird]) { + // This will be removed when VCARD will be implemented + if ([[context request] isThunderbird] && [self isKindOfClass: NSClassFromString(@"SOGoContactGCSFolder")]) { vlistExclusionQualifier = [EOQualifier qualifierWithQualifierFormat: @"c_component != 'vlist'"]; qualifier = [[[EOAndQualifier alloc] initWithQualifiers: vlistExclusionQualifier, @@ -1191,7 +1192,8 @@ static NSArray *childRecordFields = nil; folder = [self ocsFolder]; // For Thunderbird, disable contact list - if ([[context request] isThunderbird]) { + // This will be removed when VCARD will be implemented + if ([[context request] isThunderbird] && [self isKindOfClass: NSClassFromString(@"SOGoContactGCSFolder")]) { vlistExclusionQualifier = [EOQualifier qualifierWithQualifierFormat: @"c_component != 'vlist'"]; qualifier = [[[EOAndQualifier alloc] initWithQualifiers: vlistExclusionQualifier,