Fix: bday conversion clobbers NICKNAME when FN is empty
The share-by-map BDAY-to-ICS conversion builds a placeholder mapping for
the SUMMARY/DESCRIPTION/alarm templates. Each block sets the fallback
marker for its own placeholder (e.g. {nickname} -> '!nickname!', {n:f} ->
'!n:f!'), but the {fn} block wrote the empty-FN fallback to {nickname}
instead of {fn}.
As a result, for a VCARD whose FN is present but empty, a genuine
NICKNAME was overwritten with '!fn!' in the generated event, and the
{fn} placeholder never received its '!fn!' marker, so a '[{fn}|...]'
fallback in a template failed to resolve.
Assign the fallback to {fn}, matching the surrounding blocks.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -717,7 +717,7 @@ class Item:
|
||||
if hasattr(self.vobject_item, "fn") and self.vobject_item.fn.value != "":
|
||||
placeholder_mapping['{fn}'] = self.vobject_item.fn.value
|
||||
else:
|
||||
placeholder_mapping['{nickname}'] = '!fn!'
|
||||
placeholder_mapping['{fn}'] = '!fn!'
|
||||
|
||||
# rfc6350#6.2 FamilyName;GivenName;AdditionalNames;HonorificPrefixes;HonorificSuffixes
|
||||
if hasattr(self.vobject_item, "n") and self.vobject_item.n.value.family != "":
|
||||
|
||||
Reference in New Issue
Block a user