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

Propagate subscribed calendars to CalDAV clients #17754

Closed
Sesivany opened this issue Oct 30, 2019 · 23 comments · Fixed by #45841
Closed

Propagate subscribed calendars to CalDAV clients #17754

Sesivany opened this issue Oct 30, 2019 · 23 comments · Fixed by #45841
Labels
1. to develop Accepted and waiting to be taken care of feature: caldav Related to CalDAV internals feature: dav

Comments

@Sesivany
Copy link

Is your feature request related to a problem? Please describe.
I'm using the Nextcloud Calendar mostly in desktop/mobile clients. I'm subscribed to several remote calendars via ical. I can see them in the web interface, but I can't in the clients.

Describe the solution you'd like
It would be great if the calendars I'm subscribed to got propagated to CalDAV clients just like calendars that are located in my Nextcloud.

Describe alternatives you've considered
The alternative is to subscribe to the calendars in each client, but that's additional work in the initial setup and maintenance. I'd rather set them up in one location for all clients.

Additional context
Proprietary competition (Google Calendar, iCloud) supports it.

@tcitworld
Copy link
Member

DAVx5 can automatically fetch subscriptions from Nextcloud, if you have ICSx5 installed.

Anyway subscriptions are now cached by Nextcloud server, we just need to expose them to clients.
@georgehrke do we transfer and keep this issue in server?

@georgehrke
Copy link
Member

Yes, let's move it to the server.

It's basically about filling this array: https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php#L42

@georgehrke georgehrke transferred this issue from nextcloud/calendar Oct 30, 2019
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of feature: dav labels Oct 30, 2019
@BernieO
Copy link
Contributor

BernieO commented Nov 3, 2019

I just wondered, because if I subscribe to an external webcal calendar in the webinterface of Nextcloud, it is shown (including all events) on my iOS devices. But on a closer look, it looks like iOS fetches the webcal link from Nextcloud via caldav and then directly loads the calendar events from the external resource.

A change in a subscribed calendar is shown in iOS while the Nextcloud calendar-app still shows old data. Obviously the Nextcloud calendar-app doesn‘t refresh the calendar as often as my iOS devices.

So it looks like Nextcloud pushes the webcal link to the clients instead of the cached events.

Nextcloud 16.0.5
iOS 13.2

@tcitworld
Copy link
Member

A change in a subscribed calendar is shown in iOS while the Nextcloud calendar-app still shows old data. Obviously the Nextcloud calendar-app doesn‘t refresh the calendar as often as my iOS devices.

Subscribed calendars are currently cached in your browser for two hours when you're using the Calendar app.

@akoyaxd
Copy link

akoyaxd commented Jan 9, 2020

I would love this to be implemented. This would improve the experience on Gnome pretty well, especially when you use multiple computers!

@msrn
Copy link
Contributor

msrn commented Apr 28, 2021

Has there any work been done on this? Would love to have this.

@tcitworld
Copy link
Member

This feature is a fix for CalDAV clients that doesn't support discovering subscriptions from the endpoint (like DAVx⁵ does for instance).
We can only allow some clients (based on their user-agent) if we know what they are, so please post the clients you use (and if you can, their user-agent).

@msrn
Copy link
Contributor

msrn commented May 21, 2021

Currently I'm using Nextcloud Contacts and Calendar with Windows 10 Contacts/Calendar app. When initiating sync, these are the request made to server by the application.

"PROPFIND /remote.php/dav/principals/users/{USER}/ HTTP/1.1" 207 1976 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/addressbooks/users/{USER}/ HTTP/1.1" 207 1363 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/principals/users/{USER}/ HTTP/1.1" 207 1217 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/addressbooks/users/{USER}/ HTTP/1.1" 207 1363 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/principals/users/{USER}/ HTTP/1.1" 207 1341 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/calendars/{USER}/ HTTP/1.1" 207 1772 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/principals/users/{USER}/ HTTP/1.1" 207 1210 "-" "MSFT-WIN-3/10.0.19041 (gzip)"
"PROPFIND /remote.php/dav/calendars/{USER}/ HTTP/1.1" 207 1772 "-" "MSFT-WIN-3/10.0.19041 (gzip)"

User-agent being MSFT-WIN-3/10.0.19041
My current Windows version is 2004. Build 19041.985
Windows 10 contacts app version: 10.1909.12456.0
Windows 10 calendar app version: 16005.13426.20920.0

It seems that the user-agent string is tied to the build version of Windows 10. Would be it appropriate to just match MSFT-WIN-3 with regex?

@tcitworld
Copy link
Member

Would be it appropriate to just match MSFT-WIN-3 with regex?

Seems fine. It would be nice to make sure that it's different for the Outlook Caldav Synchronizer. https://caldavsynchronizer.org

@msrn
Copy link
Contributor

msrn commented May 21, 2021

Would be it appropriate to just match MSFT-WIN-3 with regex?

Seems fine. It would be nice to make sure that it's different for the Outlook Caldav Synchronizer. https://caldavsynchronizer.org

CalDavSynchronizer has the following UserAgent CalDavSynchronizer/4.1

@msrn
Copy link
Contributor

msrn commented May 22, 2021

Would be it appropriate to just match MSFT-WIN-3 with regex?

Tested this to working with expression /^MSFT-WIN-3/. During sync now Windows 10 Calendar shows subscribed calendars from Nextcloud.

Should I submit PR with the addition of this to Plugin-php? @tcitworld

@tcitworld
Copy link
Member

Please do.

@stif
Copy link

stif commented Jul 22, 2021

Not sure if it fits here..

I was able to automatically get subscribed calendars from NC in Gnome Calendar 3.38.
But after a upgrade to Gnome 40 and a fresh user home (cleaned all dot-folders and files), and adding Nextcloud to the "Online Accounts" of Gnome, the externally subscribed ical calendars are not showing up any more (they also do not appear after hitting "synchronize calendars").

This is what nextcloud webserver receives when hitting "synchronize calendars":
PROPFIND /remote.php/caldav/calendars/<user>/personal/ HTTP/1.1" 207 410 "-" "Evolution/3.40.3"

@tcitworld
Copy link
Member

tcitworld commented Jul 22, 2021

Gnome Calendar or Evolution doesn't have support for discovering CalDAV subscriptions, so I guess you manually added the subscription in Gnome Calendar at some point (which is better than having the subscription exposed as a calendar anyway, since it will refresh the subscription more frequently).

@stif
Copy link

stif commented Jul 22, 2021

Hm i am quite sure the ical calendars added to NC show up in Gnome Calendar 3.38 after hitting "synchronize calendars".
Also after manually deleting them and then hitting synchronize calendars, they appeared again with their standard name..

Anyway, thanks for answering, i will add them manually..

@msrn
Copy link
Contributor

msrn commented Nov 6, 2021

For Akonadi (KIO) based clients on KDE apps.

Mozilla/5.0 (X11; Linux x86_64) KIO/5.86 akonadi_davgroupware_resource_1/5.18.2 (21.08.2)

Filling ENABLE_FOR_CLIENTS with this useragent allows the client to see subscribed calendars.

I can make a PR of this, but should we match only the KIO part with regex?

@msrn
Copy link
Contributor

msrn commented Nov 6, 2021

Not sure if it fits here..

I was able to automatically get subscribed calendars from NC in Gnome Calendar 3.38. But after a upgrade to Gnome 40 and a fresh user home (cleaned all dot-folders and files), and adding Nextcloud to the "Online Accounts" of Gnome, the externally subscribed ical calendars are not showing up any more (they also do not appear after hitting "synchronize calendars").

This is what nextcloud webserver receives when hitting "synchronize calendars": PROPFIND /remote.php/caldav/calendars/<user>/personal/ HTTP/1.1" 207 410 "-" "Evolution/3.40.3"

Evolution was discussed some time ago in other issue #1497 (comment)

@fuzzy7k
Copy link

fuzzy7k commented Dec 9, 2022

This feature is a fix for CalDAV clients that doesn't support discovering subscriptions from the endpoint (like DAVx⁵ does for instance). We can only allow some clients (based on their user-agent) if we know what they are, so please post the clients you use (and if you can, their user-agent).

It is more than that. It is a feature in it's own right. If I had 20 subscriptions that means my mobile would need to contact 20 different servers, and depending on the update frequency of the client in use, that could mean a lot of data and unnecessary polling.

@fuzzy7k
Copy link

fuzzy7k commented Dec 9, 2022

I see why this issue has gone nowhere. Developers have implemented a conflicting, legitimate function that accomplished one desired end goal, getting the calendar onto a client app.

Unfortunately people have other use cases that require the method originally asked for in #1497.

There is an elegant way to implement this feature as to not conflict with the one developers initially chose.
Why not add a new "import" option to an already created calendar, right next to the "export" option. This would implicitly add the remote calendar to the target calendar so that when a user syncs the target calendar, they will be getting cached data from all remote calendars that have been added under the target.

Going one step further, it would be nice to be able to name the calendars, as is done now, but with the alteration that events that show up on the target calendar do so with the calendar name prepended to the event title. No name, no alteration to the event title.

For instance, I have various jobs that expose my work schedules and I would like to be able to share my "work schedule" with family. That work schedule would have all of my jobs combined on one calendar. One job names events with a location, another with my name, etc. thus the desire for prepending a calendar name to the event title.

@msrn
Copy link
Contributor

msrn commented Aug 7, 2024

I don't think this is completed. PR #45841 concerns only specific set of clients, and doesn't apply to all.

@Holbormon
Copy link

Holbormon commented Aug 8, 2024

I don't think this is completed. PR #45841 concerns only specific set of clients, and doesn't apply to all.

Agreed. Personally, I'm still waiting for propagation to DAVx⁵ clients, as per the rationale given above #17754 (comment). One more advantage of doing this would be that one wouldn't need ICSx⁵ anymore. Currently, DAVx⁵ detects subscriptions but does not handle them.

@tcitworld
Copy link
Member

One more advantage of doing this would be that one wouldn't need ICSx⁵ anymore. Currently, DAVx⁵ detects subscriptions but does not handle them.

This could change : https://fosstodon.org/@davx5app/111210536789015286

@Holbormon
Copy link

One more advantage of doing this would be that one wouldn't need ICSx⁵ anymore. Currently, DAVx⁵ detects subscriptions but does not handle them.

This could change : https://fosstodon.org/@davx5app/111210536789015286

Good to know, thanks

However, calendar propagation is still desirable for both performance and privacy reasons, so it's a shame this issue was closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of feature: caldav Related to CalDAV internals feature: dav
Projects
None yet
10 participants