python-caldav / caldav

Apache License 2.0
325 stars 98 forks source link

Synctoken: invalid value #234

Closed sm8ps closed 1 year ago

sm8ps commented 1 year ago

I set a sync token with a Nextcloud-24 server:

cal = dav_client.principal().calendar( calName )
objects = cal.objects()
syncToken = objects.sync_token

Its value is then 'http://sabre.io/ns/sync/3' which does not seem correct. -- Am I doing the right thing at all?

tobixen commented 1 year ago

http://sabre.io/ns/sync/3 seems like a weird value, but please check that it works.

In my compatibility matrix it says that sync tokens works on Nextcloud ... all until one tries to delete an event from the calendar. Then Nextcloud will send a "418 I'm a teapot" next time one is trying to do a sync using the sync-token.

sm8ps commented 1 year ago

Lo and behold, the token is indeed updated as it should! From a second run I get 'http://sabre.io/ns/sync/4'. Something weird seems to be going on in the URL but it does provide a valid sync token and objects() does respect it. Sorry for the noise and thanks for your immediate response!