nylas / sync-engine

:incoming_envelope: IMAP/SMTP sync system with modern APIs
https://nylas.com/docs/platform
GNU Affero General Public License v3.0
3.5k stars 354 forks source link

Participants remain in Nylas when removed from source event #419

Closed aaronbski closed 7 years ago

aaronbski commented 7 years ago

When an event participant is removed from Google Calendar, the participant remains in the object returned by Nylas. I have confirmed that the data returned by the Google API is correct but is persisted to the Nylas db incorrectly.

This bug may affect other providers, but I've only tested in Google Calendar at this time.

aaronbski commented 7 years ago

Merging participants appears to be the source of the bug: https://github.com/nylas/sync-engine/blob/master/inbox/events/remote_sync.py#L166

The documentation for _partial_participants_merge explains the problem:

This method is only called by the ical merging code because iCalendar attendance updates are partial: an RSVP reply often only contains the status of the person that RSVPs. It would be very wrong to call this method to merge, say, Google Events participants because they handle the merging themselves.

pfista commented 7 years ago

A fix for this has been deployed and will be included in the next sync-engine release.