server icon indicating copy to clipboard operation
server copied to clipboard

Expose subscribed webcal calendars via CalDAV

Open grafenhofer opened this issue 10 years ago • 44 comments

The calendar app has recently gained support for subscribing to third party webcal calendars (see https://github.com/owncloud/calendar/issues/132). It would be great to expose these imported calendars via CalDAV (e.g. to mobile clients). Nextcloud would act as a kind of proxy service. One usecase is increased privacy for (mobile) users (only the Nextcloud server connection gets exposed to the original webcal provider).

Related owncloud issue: https://github.com/owncloud/core/issues/26193

grafenhofer avatar Sep 23 '16 07:09 grafenhofer

Implementing a server side handling of WebCal would also allow to query a subscribed calendar in certain intervals, e.g. monthly or once a year. This would reduce the server load on public WebCal servers as requested e.g. on http://www.ifeiertage.de/

raimund-schluessler avatar Sep 27 '16 07:09 raimund-schluessler

I am also interrested in this feature. My use case is that i have some friends sharing their google calendar with me and i don't want to rely on anotherr app on every devices and subscribe to all their ics calendars on all my devices.

Thank you !

marmeladema avatar Jan 08 '17 20:01 marmeladema

Please refrain from commenting when you can't add anything new. Use Github Reactions instead. :)

georgehrke avatar Mar 29 '17 10:03 georgehrke

According to @nickvergessen, Webcal was implemented natively in DavDroid. This massively decreases the priority of this issue. Postponing to 14.

georgehrke avatar Oct 30 '17 17:10 georgehrke

I would still like to see this feature. It would be nice to have it like a cache and possibly alter certain aspects like editing reminder settings.

dsonck92 avatar Oct 30 '17 18:10 dsonck92

Last I checked, which was yesterday, this requires installation of another app.Davdroid just informs you of the calendars and then tells you to install that app. (ICSDroid)

On Mon, Oct 30, 2017, at 17:57, Georg Ehrke wrote:

According to @nickvergessen[1], Webcal was implemented natively in DavDroid. This massively decreases the priority of this issue. Postponing to 14.> — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[2], or mute the thread[3].>

Links:

  1. https://github.com/nickvergessen
  2. https://github.com/nextcloud/server/issues/1497#issuecomment-340530675
  3. https://github.com/notifications/unsubscribe-auth/ABssJmuymkKIJXpjdWhL9MGZ3kNMkJRxks5sxg4OgaJpZM4KEr2g

ralin3 avatar Oct 30 '17 18:10 ralin3

In about a year I'm moving to a Purism - Librem 5 (GNU/Linux native mobile) which does not have DavDroid.

Also, no support for this means I have to manually add the calendars to all applications / devices I use it on.

I understand everything have different priorities, I just wanted to come with some input on the issue.

sbug-1bit avatar Oct 30 '17 18:10 sbug-1bit

Also another motivation is: it would unify the way the web client can load the calendars. The whole iCal side of the client would not be necessary anymore.

dsonck92 avatar Oct 30 '17 18:10 dsonck92

I'm on mobile so no edit on my post, but as a matter of fact, the only thing that Davdroid does is push the url's of the subscripted calendars to ICSDroid.Then ICSDroid polls the servers directly, and works regardless of/in no sync with nextcloud.To say that Davdroid supports it then, is to my eyes, wrong.

This has already been postponed two or three major versions and is a feature that should have been there from first implementation of webcal. This works clientside if you use closed-source applications, and/or if you ignore NC.

On Mon, Oct 30, 2017, at 18:06, spacebug0 wrote:

In about a year I'm moving to a Purism - Librem 5 (GNU/Linux native mobile) which does not have DavDroid.> Also, no support for this means I have to manually add the calendars to all applications / devices I use it on.> I understand everything have different priorities, I just wanted to come with some input on the issue.> — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/nextcloud/server/issues/1497#issuecomment-340533618
  2. https://github.com/notifications/unsubscribe-auth/ABssJs8U_lwq-V3rYQNZeX01mTYOhoPLks5sxhAigaJpZM4KEr2g

ralin3 avatar Oct 30 '17 18:10 ralin3

@ralin3 I have DAVdroid-1.9-ose installed (from F-Droid), but I cannot seem to find where it is informing about the subscribed calendars. Could you explain how that works? (or if you have the same version installed)

Peque avatar Oct 30 '17 18:10 Peque

@Peque you need to refresh your calendars, then the webcals will be displayed. On the issue itself I'd also appreciate if this feature request would finally become reality.

screenshot_2017-10-30-19-53-57-672_at bitfire davdroid

Weishaupt avatar Oct 30 '17 18:10 Weishaupt

Stay calm everyone ... I only moved this issue to the next Milestone, i didn't close it ...

georgehrke avatar Oct 30 '17 19:10 georgehrke

It's already been postponed..... The issue is over a year old, that was for NC10.

Now it's been postponed untill 14.

On Mon, Oct 30, 2017, at 19:54, Georg Ehrke wrote:

Stay calm everyone ... I only moved this issue to the next Milestone, i didn't close it ...> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/nextcloud/server/issues/1497#issuecomment-340564455
  2. https://github.com/notifications/unsubscribe-auth/ABssJnOK3BYNH9JvhnflJujXNswkR2nZks5sxilagaJpZM4KEr2g

ralin3 avatar Oct 30 '17 20:10 ralin3

Nextcloud is free software, so please actually help implementing stuff instead of telling how slow we are.

We only have limited time, so we can’t implement every user request in time. So implement it if u can’t live without it

And if u can’t program, find someone who can or add a bounty

georgehrke avatar Oct 30 '17 21:10 georgehrke

I'm not complaining about slowness, if this issue had been tagged NC14 when it was made last year I would be disappointed but that's that, I'd keep my voice shut. But continuously telling it will come in the next version for 4 consecutive versions is not a positive for the project - I'm already waiting for this to be postponed to NC15. Considering your partnership with puri.sm, as already pointed out - Davdroid doesn't work for them, and the reasoning behind postponing to 14 is also flawed, and this is apparently a very requested feature - it also leaves the calendar app looking halfway done.I can't imagine users thinking it's okay to not view some of the calendars on a mobile device...Do you also tell enterprise users to implement the fixes for themselves?

On Mon, Oct 30, 2017, at 21:17, Georg Ehrke wrote:

Nextcloud is free software, so please actually help implementing stuff instead of telling how slow we are.> We only have limited time, so we can’t implement every user request in time. So implement it if I can’t live without it> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[1], or mute the thread[2].>

Links:

  1. https://github.com/nextcloud/server/issues/1497#issuecomment-340587269
  2. https://github.com/notifications/unsubscribe-auth/ABssJiGfFSZMVQ5mlCOYauxam6xscOWaks5sxjzygaJpZM4KEr2g

ralin3 avatar Oct 30 '17 21:10 ralin3

I think I just used this (missing) feature successfully - was it silently added in the meantime or is this issue about something different? I just hit this issue while searching for something completely different, didn't even know that this issue exists.

After adding an external hosted .ics file as a calendar subscription I was able to sync it using my Android device using the app "CalDav-Sync". No special configuration required. My aCalendar app shows every event just as expected.

theraser avatar Feb 11 '18 20:02 theraser

@theraser, cannot reproduce on SailfishOS; I suppose that CalDav-Sync handles the special case just like DavDroid then?

rubdos avatar Feb 12 '18 13:02 rubdos

I think I just used this (missing) feature successfully - was it silently added in the meantime or is this issue about something different?

No, it wasn't implemented yet. Technically, WebCal calendars are already exposed via CalDAV as a special collection type called subscription. But that's not part of the CalDAV standard. Therefore it's only supported by a limited variety of Calendar applications like iOS, macOS and apparently certain Android apps.

Once this feature is implemented, WebCal calendars will be cached on the Nextcloud server and exposed as ordinary calendar collections that any caldav client will understand.

georgehrke avatar Feb 12 '18 13:02 georgehrke

What would be the basic steps to implement this feature, is this something a guy with only java experience can handle? Really missing this feature, thought about a java linux client which sync the webcal links, but that would be the wrong way round i guess

moritz31 avatar May 30 '18 04:05 moritz31

What would be the basic steps to implement this feature

My approach would be the following:

  • add a database table structured like oc_calendarobjects for subscriptions. Call it oc_calendarsubscrobjects or something like that.
  • create a class OCA\DAV\CalDAV\CachedSubscription that inherits from \Sabre\CalDAV\Calendar. Don't inherit it from OCA\DAV\CalDAV\Calendar directly, because it's shareable and making the CachedSubscription shareable will require quite some amount of work, so let's do one step after the other and add shareability later on.
  • extend OCA\DAV\CalDAV\CalDAVBackend with methods to read and write from and into the oc_calendarsubscrobjects table. Use these methods in the CachedSubscription class.
  • Add a background job, that periodically pulls the webcal url stored in oc_calendarsubscriptions, parse it, split it up (using the Sabre VObject Splitter) and write the individual objects into the oc_calendarsubscrobjects table. It's ok if you just delete all other objects of that subscription in oc_calendarsubscrobjects in advance, you don't have to compare single objects for changes because the calendar is read-only anyway. (Use a TimedJob for that)

Nice to have:

  • respect the refresh rate given in oc_calendarsubscriptions instead of pulling with some hard coded refresh rate
  • if the refresh rate is null, check the ics data for properties like X- PUBLISHED-TTL or REFRESH-INTERVAL and update the oc_calendarsubscriptions table correspondingly.
  • respect the strip todo / alarms / attachments properties from oc_calendarsubscriptions

One of the most important things is to persevere the full subscription functionality for clients that actually do support our current way of handling of subscriptions. So please don't delete any subscription code, but allow the code to run side by side. The best way to distinguish if a client supports it would be by checking with a user agent regex respectively checking for a certain header.

if you want to tackle this issue, I'd be happy to guide if you have any further questions.

georgehrke avatar May 30 '18 13:05 georgehrke