Repository navigation
fix: Keep vendor relation hints in step with the Card - #25
Merged
Merged
Conversation
Properties kept in vCardProps are written with their raw value, and a value a dialect set afterwards was ignored: Apple's built-in labels, such as _$!<Spouse>!$_, came back as the readable labels they are read as. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Apple label and the Android type a relation was read with were written back as they were, even when the Card had changed the relation since: a spouse turned friend stayed a spouse for the address book, and came back as both. A kept label or type now stays only while it agrees with the Card: a mother stays for a parent, a spouse goes for a friend. Apple keeps a label of the user's own, such as "Godmother", since TYPE holds the relation anyway; an Android row holds a single type, so it keeps one only for a relation with no type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An X-ABLabel kept in vCardProps outlived the property it labeled: remove a relation or an anniversary read from Apple, and its label stayed alone in its group, read and written again forever. The encoder now leaves it out, and reports it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Importing a contact, editing it, then exporting it for the same address book gave stale or broken labels.
RawPropertyignored a value set after reading. Apple's built-in labels kept invCardPropswere written back in their readable form (spouseinstead of_$!<Spouse>!$_), even without any edit. Apple then showed them as custom labels.["friend", "spouse"]. Android kept writing the oldX-ANDROID-TYPE, so the edit was lost entirely. A kept label or type now stays only while it agrees with the Card: a mother stays for a parent, a spouse goes for a friend. Apple keeps a custom label such as "Godmother", sinceTYPEholds the relation anyway. An Android row holds a single type, so it keeps a custom label only for a relation with no type.X-ABLabelstayed alone in its group forever. The encoder now leaves it out and reports it as an issue.Each point has its own commit and tests. The round-trip tests on the cozy-vcard exports still pass.
Not covered: an Apple anniversary whose
kindchanges keeps its_$!<Anniversary>!$_label.🤖 Generated with Claude Code