[buteo-sync-plugin-caldav] Correct URL in case of mangled UIDs. #23
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.
When receiving a new incidence from upstream,
the UID is mangled with the notebook UID to avoid
collision with an existing UID in another notebook.
The URL of the received incidence is stored with
the incidence, so when modifying such incidence
the update is sent to the correct URL and not
one created from the mangled UID.
Unfortunately, creating an exception for such a
recurring incidence on device, will not copy
the URL (as it is stored in comments) and when
pushing the exception to the server, the mangled
UID is used to forge the URL, which is faulty.
See calendarworker.cpp in nemo-qml-plugin-calendar, the dissociateSingleOccurrence() call is properly
copying the comments, but the information is not
passed to the manager via CalendarData::Event
structure. Then, when saving the event in saveEvent(), the proper URL is lost.
@pvuorela, it's a bit strange that I didn't notice it before. The case of having a recurring event coming for upstream and then adding an exception on device was something I only did yesterday, apparently. I was truly convinced that comments were copied in the QML bindings and I needed to reread the code there several times to see that it cannot because the Event struct does not possess such a field. The fix should be in Buteo CalDAV plugin though, because there is no way for the QML bindings to know that comments are holding important code for the sync process.