tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
5.95k stars 511 forks source link

Appointments from macOS calendar are not updated whit gmail integration #3908

Open bedhub opened 2 years ago

bedhub commented 2 years ago

Describe the bug When receiving calendar event updates from a macOS user these changes do not apply to my tutanota calendar. The organizer uses the default macOS calendar application to create and update events in his gmail calendar.

To Reproduce Steps to reproduce the behavior:

  1. Configure gmail calendar integration in macOS
  2. Create an appointment within the gmail calendar using the default macOS calendar application and invite tutanota user
  3. Accept invitation in Tutanota
  4. Change start time by one day.
  5. Receive update email within Tutanota mailbox (notice that the actual email is delivered from gmail.com)
  6. See that new date is not applied to calendar event.

Expected behavior The start date should have been changed automatically.

Version

Additional context The update only does not work when using the macOS calendar application. When using the gmail calendar web application updates are handled correctly by the Tutanota calendar application.

bedhub commented 2 years ago

I analysed this szenario with gmail integration and it seems that when using macOS calendar application with gmail integration the sequence number is not updated. It always is set to one and therefore we do not update the tutanota calendar event appointment. There is an example file attached for an event that is updated from 2022-02-21 to 2022-02-21. The thing that was changed is the LAST-MODIFIED timestamp so we can try to use that in addition to check if we should apply the update but we need to store a modification date on the event itself.

https://github.com/tutao/tutanota/blob/4c274e5ee15f04ecc5cd96f096cc9bf9804baa82/src/calendar/model/CalendarModel.ts#L383-L385 invite_update.txt invite_initial.txt