Commit graph

555 commits

Author SHA1 Message Date
Richard Steinmetz
012bb75dba fix(caldav): event links in shared calendar notifications
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-06-11 18:41:56 +00:00
John Molakvoæ
88c8e244f1
Merge pull request #45639 from nextcloud/backport/45235/stable27 2024-06-07 12:13:20 +02:00
Christoph Wurst
8cf58e4f15
fix(dav): Add retention time to sync token cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-06-04 19:15:10 +02:00
Anna Larch
02b984debd fix(caldav): automatically delete outdated scheduling objects
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-06-03 17:07:29 +02:00
Daniel Kesselberg
dead36211e feat(caldav): order the calendar objects by start date for search
Sorting the events by the start date leads to more predictable results for the search API consumers.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-06-03 12:17:46 +02:00
Daniel Kesselberg
a9172f0092 fix(caldav): event search with limit and timerange
Event recurrences are evaluated at runtime because the database only knows the first and last occurrence.

Given, a user created 8 events with a yearly reoccurrence and two for events tomorrow.
The upcoming event widget asks the CalDAV backend for 7 events within the next 14 days.

If limit 7 is applied to the SQL query, we find the 7 events with a yearly reoccurrence and discard the events after evaluating the reoccurrence rules because they are not due within the next 14 days and end up with an empty result even if there are two events to show.

The workaround for search requests with a limit and time range is asking for more row than requested and retrying if we have not reached the limit.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-06-03 12:17:46 +02:00
Daniel
bf9b80fdab
Merge pull request #44196 from nextcloud/backport/44130/stable27
[stable27] fix(dav): Add occ command to fix missing caldav sync tokens
2024-06-03 12:17:07 +02:00
Daniel Kesselberg
9bcff76908 feat(caldav): expose calendar subscriptions
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-05-31 17:56:30 +02:00
Christoph Wurst
86020a510a
fix(dav): Add occ command to fix missing caldav sync tokens
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-05-31 14:50:53 +02:00
Anna Larch
5e0ce35012 fix(caldav): loop through all events for busy events
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-05-14 13:33:02 +00:00
Anna Larch
5e9da1bf46 fix(CalDAV): remove UNKNOWN from room / resource consideration
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-04-26 11:21:28 +00:00
Robert C. Schaller
c98305c31a fix(dav): wrong comparison method between two events
Old comparison implementation compares each element of the array against each other with no respect for the associated array label, which leads to wrongful removals because one value is accidentally present in a completely different label. New comparison works 'by-label' individually.

Partly fixes #41084 because changes between 'SEQUENCE' not present, 'SEQUENCE:0' and 'SEQUENCE:1' were not detected in the old implementation and thus no email update sent.

Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com>
Signed-off-by: Robert C. Schaller <gtbc_robert.schaller@rsxc.de>
2024-03-26 08:48:13 +00:00
Anna Larch
512634fa2e fix(caldav): add EXDATE and EXRULE to confidential object
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-03-21 13:37:45 +00:00
Patrick Fischer
37d34f905d Bug fix: Select the correct table based on CALENDAR_TYPE_CALENDAR
Signed-off-by: Patrick Fischer <mail@patrickfischer.ch>
2024-02-23 20:38:00 +00:00
Christoph Wurst
844a1b47f5
fix(dav): Rate limit calendar/subscription creation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-02-22 10:47:24 +01:00
Johannes Merkel
823aa887e5
fix(CalDAV): set acls for DeletedCalendarObjectsCollection
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
2024-01-18 08:40:09 +01:00
Richard Steinmetz
fe5b5a7fa3
fix(dav): allow multiple organizers if possible
This is very hacky! However, we want to allow saving events with multiple
organizers. Those events are not RFC compliant, but sometimes imported from major
external calendar services (e.g. Google). If the current user is not an organizer of
the event we ignore the exception as no scheduling messages will be sent anyway.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2024-01-02 11:55:25 +01:00
Anna Larch
90cb0bcb8e fix(caldav): don't reuse query builder objects
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-12-16 10:05:34 +01:00
Anna Larch
becf192b6b fix(scheduling): don't send iMIP emails to rooms / resources
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-11-27 09:24:22 +01:00
Christoph Wurst
69b9a56bbb fix(dav): Avoid date diffing if PHP is buggy
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-24 10:43:48 +00:00
Christoph Wurst
d1e501a8d6 fix(dav): Reduce CalDAV backend memory footprint
fetchAll inflates memory. Fetching in a loop allows GC to run earlier
and more often.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-06 12:48:24 +01:00
Richard Steinmetz
28f58a8af9 fix(dav): expand recurrences when searching
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-09-26 08:04:33 +00:00
Daniel Kesselberg
0da5cb3b85 fix(caldav): add webroot to objectid for activities
A calendar uri includes the webroot: example.com/cloud/remote.php/dav/calendars/alice/personal/
The calendar app uses base64(calendar uri) as identifier for calendar objects.

Without this patch the links from activity app to calendar app don't work for installations in a subdirectory.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-09-13 19:34:03 +00:00
Anna Larch
9459352f53 fix(CalDAV): check birthday calendar owner
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-09-07 09:25:08 +02:00
Robin Appelman
526a1404c0 cache calendar objects from calendarQuery
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 09:10:19 +00:00
Robin Appelman
234ae93f18 preload shares for calendars when listing calendars
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-14 09:10:19 +00:00
Jamie McClelland
b025e67d8d ensure outerquery ->where() function doesn't clobber earier ->andWhere()
Signed-off-by: Jamie McClelland <jm@mayfirst.org>
2023-08-10 12:54:20 +02:00
Jamie McClelland
6de2eccb7b optimize calendar search query
see https://github.com/nextcloud/calendar/issues/4758

Signed-off-by: Jamie McClelland <jm@mayfirst.org>
2023-08-10 12:54:20 +02:00
Richard Steinmetz
e5a0d65af4
feat(caldav): linkify location in scheduling mails
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-08-10 08:20:39 +02:00
Thomas Citharel
e08051dbbc style(caldav): improve getDenormalizedData method
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-08-02 21:12:09 +02:00
Thomas Citharel
c47942d653 Fix creating events with old (< unix time) lastoccurence
Closes #20804

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-08-02 21:12:09 +02:00
Arthur Schiwon
592aeec17e
Merge pull request #38919 from nextcloud/backport/38639/stable27
[stable27] pruneOutdatedSyncTokens deletes all entries
2023-07-12 19:50:40 +02:00
Richard Steinmetz
f2e9044494
fix(dav): close cursor when fetching max id
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-07-11 08:02:45 +02:00
Christoph Wurst
1bbeffa4a5 fix(caldav): Ignore invalid events for reminder generation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-10 18:24:05 +02:00
Christof Arnosti
8457a227e3
Issue #36644: Fix pruneOutdatedSyncTokens for CalDAV
pruneOutdatedSyncTokens accidentally deletes all entries of the calendarchanges table
instead of leaving $limit elements in the table

Signed-off-by: Christof Arnosti <charno@charno.ch>
2023-06-21 08:12:52 +02:00
Anna
9e53934498
Merge pull request #36118 from nextcloud/fix/caldav/invitation-outlook-compatibilty
Fix calendar emails to be outlook compatible
2023-05-10 12:10:42 +02:00
Daniel Teichmann
56f36b94e5
Rename setting 'sendEventRemindersToSharedGroupMembers' to 'sendEventRemindersToSharedUsers'.
Signed-off-by: Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de>
2023-05-04 13:05:00 +02:00
Ferdinand Thiessen
62c4ae78df Feature: Provide access to app generated calendars through CalDAV
This adds CalDAV support for app generated calendars,
which are registered to the nextcloud core.
This is done by adding a dav plugin which wraps
all ICalendarProviders into a Sabre plugin (inspired by the deck app).

Add unit test for AppCalendar wrapper plugin and calendar object implementation.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
2023-04-25 18:11:49 +02:00
Maximilian Martin
c8985944ec fix event move issue
Signed-off-by: Maximilian Martin <maximilian_martin@gmx.de>
2023-04-18 09:45:30 +02:00
Simon L
66ab45b8a0
Merge pull request #36528 from nextcloud/dav-backend-transations
CalDAV/CardDAV: put every method from backends that does multiple DB calls in transactions
2023-04-18 00:55:29 +02:00
Simon L
6afda50590
Merge pull request #37645 from nextcloud/fix/improve-imip-emails
fix(dav): Parse sender PARTSTAT in REPLYs
2023-04-17 23:49:16 +02:00
Thomas Citharel
ff3b69b21d refactor(dav): Since we're in a transaction, use QB properly when incrementing synctoken
Now that we're in a transaction, we can reuse the sync token's previous value without trouble, and rewrite the increment UPDATE query without dirty direct SQL.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-04-17 16:08:44 +00:00
Thomas Citharel
c9a3129cb4 fix(CalDAV/CardDAV): put every method from Cal/CardDAV backends that does multiple DB calls in transactions
In a lot of methods we're doing read-after-writes (for instance calling
updateProperties after touching calendar objects).
There's also a lot of deleting methods that do stuff sequentially which
could cause trouble.
This should avoid this kind of issues.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-04-17 16:08:44 +00:00
Simon L
e63720b714
Merge pull request #36217 from nextcloud/handle-push-notification-with-no-calendar-name
Handle reminders where calendar name is null
2023-04-17 15:43:21 +02:00
Simon L
bdb09abd1a
Merge pull request #36845 from Murena-SAS/reminder-iterator-exception
Fix max instances exception in get vevent call
2023-04-17 15:26:11 +02:00
Anna Larch
fd85c86cde fix(dav): Parse sender PARTSTAT in REPLYs
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-04-13 18:55:08 +02:00
Arthur Schiwon
784b2bd703
Merge pull request #37626 from nextcloud/fix/compare-imip-email-values
fix(dav): add string comparison for diff
2023-04-11 19:36:13 +02:00
jld3103
b153340b62
Add type hints for mappers
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-07 09:49:42 +02:00
Anna Larch
1811a0e8f9 fix(dav): add string comparison for diff
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-04-07 00:28:42 +02:00
jld3103
7e58aa1a05
Fix DAV types
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-05 07:06:50 +02:00