summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/AppInfo
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2021-03-12 11:20:04 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-05-31 07:49:19 +0200
commitd6d8e9215c69a9e8d4bfa2035c657b0a037f3a2f (patch)
tree942254503672d6ab3e0b6c8fca0bd4053db352b9 /apps/dav/lib/AppInfo
parent9e596dd0cf455dc1639141c695f89c7d936f4c0c (diff)
downloadnextcloud-server-d6d8e9215c69a9e8d4bfa2035c657b0a037f3a2f.tar.gz
nextcloud-server-d6d8e9215c69a9e8d4bfa2035c657b0a037f3a2f.zip
Add a trashbin for calendars and calendar objects
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/AppInfo')
-rw-r--r--apps/dav/lib/AppInfo/Application.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php
index d6c20f81d96..8dfbf62db2c 100644
--- a/apps/dav/lib/AppInfo/Application.php
+++ b/apps/dav/lib/AppInfo/Application.php
@@ -57,9 +57,13 @@ use OCA\DAV\Events\AddressBookShareUpdatedEvent;
use OCA\DAV\Events\AddressBookUpdatedEvent;
use OCA\DAV\Events\CalendarCreatedEvent;
use OCA\DAV\Events\CalendarDeletedEvent;
+use OCA\DAV\Events\CalendarMovedToTrashEvent;
use OCA\DAV\Events\CalendarObjectCreatedEvent;
use OCA\DAV\Events\CalendarObjectDeletedEvent;
+use OCA\DAV\Events\CalendarObjectMovedToTrashEvent;
+use OCA\DAV\Events\CalendarObjectRestoredEvent;
use OCA\DAV\Events\CalendarObjectUpdatedEvent;
+use OCA\DAV\Events\CalendarRestoredEvent;
use OCA\DAV\Events\CalendarShareUpdatedEvent;
use OCA\DAV\Events\CalendarUpdatedEvent;
use OCA\DAV\Events\CardCreatedEvent;
@@ -129,7 +133,11 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(CalendarDeletedEvent::class, ActivityUpdaterListener::class);
$context->registerEventListener(CalendarDeletedEvent::class, CalendarObjectReminderUpdaterListener::class);
$context->registerEventListener(CalendarDeletedEvent::class, CalendarDeletionDefaultUpdaterListener::class);
+ $context->registerEventListener(CalendarMovedToTrashEvent::class, ActivityUpdaterListener::class);
+ $context->registerEventListener(CalendarMovedToTrashEvent::class, CalendarObjectReminderUpdaterListener::class);
$context->registerEventListener(CalendarUpdatedEvent::class, ActivityUpdaterListener::class);
+ $context->registerEventListener(CalendarRestoredEvent::class, ActivityUpdaterListener::class);
+ $context->registerEventListener(CalendarRestoredEvent::class, CalendarObjectReminderUpdaterListener::class);
$context->registerEventListener(CalendarObjectCreatedEvent::class, ActivityUpdaterListener::class);
$context->registerEventListener(CalendarObjectCreatedEvent::class, CalendarContactInteractionListener::class);
$context->registerEventListener(CalendarObjectCreatedEvent::class, CalendarObjectReminderUpdaterListener::class);
@@ -138,6 +146,10 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(CalendarObjectUpdatedEvent::class, CalendarObjectReminderUpdaterListener::class);
$context->registerEventListener(CalendarObjectDeletedEvent::class, ActivityUpdaterListener::class);
$context->registerEventListener(CalendarObjectDeletedEvent::class, CalendarObjectReminderUpdaterListener::class);
+ $context->registerEventListener(CalendarObjectMovedToTrashEvent::class, ActivityUpdaterListener::class);
+ $context->registerEventListener(CalendarObjectMovedToTrashEvent::class, CalendarObjectReminderUpdaterListener::class);
+ $context->registerEventListener(CalendarObjectRestoredEvent::class, ActivityUpdaterListener::class);
+ $context->registerEventListener(CalendarObjectRestoredEvent::class, CalendarObjectReminderUpdaterListener::class);
$context->registerEventListener(CalendarShareUpdatedEvent::class, CalendarContactInteractionListener::class);
@@ -220,6 +232,7 @@ class Application extends App implements IBootstrap {
$syncService->updateUser($user);
});
+
$dispatcher->addListener('\OCA\DAV\CalDAV\CalDavBackend::updateShares', function (GenericEvent $event) use ($container) {
/** @var Backend $backend */
$backend = $container->query(Backend::class);