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

Fixes #5386
pull/273/merge
Francis Lachapelle 2021-09-07 13:35:48 -04:00
parent a6a3f2fb88
commit 7b5cddcf2d
1 changed files with 5 additions and 0 deletions

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];