Commit Graph

205 Commits (ec5133b739eabc76271789504b4dbb91a534f552)

Author SHA1 Message Date
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 months ago
Christoph Wurst 3dea99f42b
fix(dav): Add retention time to sync token cleanup
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2 months ago
Christoph Wurst f40f962c2e
fix(dav): Add occ command to fix missing caldav sync tokens
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 months ago
Christoph Wurst a2fcf50f43
fix(dav): Fix atomic calendar/subscription updates
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 months ago
Patrick Fischer 0f16153e4a Bug fix: Select the correct table based on CALENDAR_TYPE_CALENDAR
Signed-off-by: Patrick Fischer <mail@patrickfischer.ch>
3 months ago
Christoph Wurst dc7f2baf26 fix(dav): Rate limit calendar/subscription creation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 months ago
Anna Larch dce69154ba enh(sharing): enable unsharing for sharees for DAV shares (addressbooks and calendars)
Signed-off-by: Anna Larch <anna@nextcloud.com>
4 months ago
Anna Larch 3475d52741 fix(caldav): don't reuse query builder objects
Signed-off-by: Anna Larch <anna@nextcloud.com>
6 months ago
Benjamin Gaussorgues 3545a1c613
feat(caldav): Allow advanced search for events/tasks
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
7 months ago
Christoph Wurst 91b31bfb15
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>
7 months ago
Richard Steinmetz ace08819f9
fix(dav): expand recurrences when searching
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
8 months ago
Robin Appelman 30e9f520f3
Merge pull request #39568 from nextcloud/caldav-share-preload
Calendar optimizations
10 months ago
Jamie McClelland 4a98bb9972 ensure outerquery ->where() function doesn't clobber earier ->andWhere()
Signed-off-by: Jamie McClelland <jm@mayfirst.org>
10 months ago
Jamie McClelland ece685d6f5 optimize calendar search query
see https://github.com/nextcloud/calendar/issues/4758

Signed-off-by: Jamie McClelland <jm@mayfirst.org>
10 months ago
Robin Appelman 7c02eedabb
cache calendar objects from calendarQuery
Signed-off-by: Robin Appelman <robin@icewind.nl>
10 months ago
Robin Appelman 31c483b759
preload shares for calendars when listing calendars
Signed-off-by: Robin Appelman <robin@icewind.nl>
10 months ago
Joas Schilling e9ac0287f2
Merge pull request #39297 from nextcloud/fix/dav/close-cursor
fix(dav): close cursor when fetching max id
11 months ago
Richard Steinmetz 9206c0f473
fix(dav): close cursor when fetching max id
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
11 months ago
Joas Schilling f59c74062a
fix(dav): Move DAV app to non deprecated event dispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
11 months ago
Thomas Citharel 1e390e1982 style(caldav): improve getDenormalizedData method
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
11 months ago
Thomas Citharel 3886b00a33 Fix creating events with old (< unix time) lastoccurence
Closes #20804

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
11 months ago
Christof Arnosti 73fb2997f4 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>
12 months ago
Maximilian Martin c8985944ec fix event move issue
Signed-off-by: Maximilian Martin <maximilian_martin@gmx.de>
1 year ago
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>
1 year ago
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>
1 year ago
Daniel c6c512a19d
Merge pull request #34375 from nextcloud/fix/trashbin-uid
fix(dav) Handle Calendar trashbin UID conflicts by removing the deleted calendar object
1 year ago
Anna Larch 5b6a0affd0 Allow reimporting prev. deleted items by deleting trashbin item
Signed-off-by: Anna Larch <anna@nextcloud.com>
1 year ago
Christoph Wurst b5f7afd0fb
fix(caldav): Fix reminder timezone drift for all-day events
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 year ago
Côme Chilliet c4d90f3e81
Removed catch of ValueError as we cannot know if it’s >2038 or <1970
Also fixed numericToString to correctly convert float to int if it fits

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet d315bce300
Improve behavior with dates on 32bits and fix tests or skip them
We do not support events after 2038 on 32bits but still behave better
 when date range start/end is after 2038.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Joas Schilling 1a31ddb56d
Do not reuse query builder objects in DAV account deletion
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 year ago
Anna Larch e5c290bb7f Switch to DisplayNameCache for CalDAV
Signed-off-by: Anna Larch <anna@nextcloud.com>
2 years ago
Thomas Citharel 6f15873321 Add a background job to prune outdated sync tokens
We remove all outdated sync tokens, based on their auto-incremented ID.

By default we only keep the last 10 000, but this can be configurable.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 years ago
Christoph Wurst e6d8da4cdc Fix causal reads in CalDAV backend
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2 years ago
Anna Larch b044c7586b
Check calendar URI length before creation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2 years ago
Anna Larch 4ca4b02793 Support iMIP invitations from Mail
Signed-off-by: Anna Larch <anna@nextcloud.com>
2 years ago
luz paz d4637ef4d8 Fix typos in apps/dav subdirectory
Found via `codespell -q 3 -S l10n -L jus ./apps/dav`

Signed-off-by: luz paz <luzpaz@github.com>
2 years ago
Carl Schwan 3598ec4028 Add typing to Sharing Backend
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Thomas Citharel 39ef0500d1
Handle the move operation properly between shared calendars
- Introduce a new CalendarObjectMovedEvent typed event dedicated for
  this operation
- Handle the event in the activity backend and add new appropriate activity subjects

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 years ago
Vincent Petry 8e61671b82
Merge pull request #32364 from nextcloud/dav-listeners
🧹 Remove all legacy event dispatchers from CalDAV & CardDAV backends
2 years ago
Thomas Citharel cf8b98bf5f
Make sure activities are not created when a deleted calendar object expires
Closes https://github.com/nextcloud/activity/issues/784

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 years ago
Thomas Citharel 060c8d7c4b
Add some typed properties
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 years ago
Thomas Citharel 4bb31c021e
Remove all legacy event dispatchers from CalDAV & CardDAV backends
Move them to proper EventListeners and test them

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2 years ago
Côme Chilliet e2531f8503
Migrate dav application from ILogger to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Christoph Wurst 288f07a5a4 Fix CalDAV subscriptions calendarorder column/prop type
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2 years ago
Christoph Wurst 941e560b5e Fix column/property type of the calendar order
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2 years ago
Christoph Wurst 4f33b6937b Fix column/property type of the CalDAV deleted_at time stamp
The timestamp is an int, but we treated it as string. With this patch
the property map is enriched with types and settype casts the value if
necessary.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2 years ago
Anna Larch 0745fc5012 Move calendar objects between calendars instead of deleting and recreating them
Signed-off-by: Anna Larch <anna@nextcloud.com>
2 years ago
Christoph Wurst b005846d1f
Carefully filter out non matching time ranges for CalDAV search
When we search for CalDAV objects in the DB we take the first and last
occurence into account. For recurring events that is when they take
place the very first time and the very last time. Searching in a more
specific time range will still match this condition, because the
recurring event starts before the end of the requested range but ends
after the start of the requested range.

Sabre has filters for this. If we apply them on all seach objects of a
search with a time range, then only the recurring events actually taking
place at the time of the requested time range will be returned.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst 98d4aefe43
Close open cursor in the caldav back-end
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago