Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix metadata in ExtendedProperties of GCal events #38

Merged
merged 5 commits into from
Aug 1, 2023

Conversation

MichaelEischer
Copy link
Collaborator

This PR removes the (not really necessary) special case to clean up events with an emtpy (but existing) SourceID field in their ExtendedProperties, as suggested in #33.

The more important change is the introduction of a prefix for the metadata fields to prevent potential collisions. To ensure backwards compatibility, the code falls back to the old unprefixed keys if the prefixed keys do not exist. The idea here is to eventually drop support for the unprefixed keys, but support both to simplify the transition.

No longer consider events with an empty SourceID field in their metadata
as invalid. This case could only be triggered if a Google calendar event
contains `ExtendedProperties` in which the `SourceID` is set to an empty
string. However, this can not be the case for events synced with
somewhat recent CalendarSync versions.
The `ExtendedProperties` of an event are potentially shared with other
tools. Thus, prevent conflicts by prefixing our metadata.
@alxndr13 alxndr13 merged commit 9f869df into main Aug 1, 2023
@alxndr13 alxndr13 deleted the defensive-sync branch August 1, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants