fix(addressbook): generate UID when importing cards if missing

Fixes #5386
This commit is contained in:
Francis Lachapelle
2021-09-07 13:35:48 -04:00
parent a6a3f2fb88
commit 7b5cddcf2d
+5
View File
@@ -370,6 +370,11 @@ static NSArray *photoTags = nil;
// TODO: shall we add .vcf as in [SOGoContactGCSEntry copyToFolder:]
uid = [card uid];
if (![uid length])
{
uid = [folder globallyUniqueObjectId];
[card setUid: uid];
}
contact = [SOGoContactGCSEntry objectWithName: uid
inContainer: folder];
[contact setIsNew: YES];