aboutsummaryrefslogtreecommitdiffstats
path: root/core/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Application.php')
-rw-r--r--core/Application.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/core/Application.php b/core/Application.php
index 967e3a62c1e..97ebae774dd 100644
--- a/core/Application.php
+++ b/core/Application.php
@@ -28,12 +28,18 @@
namespace OC\Core;
+use OC\Authentication\Events\RemoteWipeFinished;
+use OC\Authentication\Events\RemoteWipeStarted;
+use OC\Authentication\Listeners\RemoteWipeActivityListener;
+use OC\Authentication\Listeners\RemoteWipeNotificationsListener;
use OC\Authentication\Notifications\Notifier as AuthenticationNotifier;
use OC\Core\Notification\RemoveLinkSharesNotifier;
use OC\DB\MissingIndexInformation;
use OC\DB\SchemaWrapper;
use OCP\AppFramework\App;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\IDBConnection;
+use OCP\IServerContainer;
use OCP\Util;
use Symfony\Component\EventDispatcher\GenericEvent;
@@ -54,7 +60,8 @@ class Application extends App {
});
$server = $container->getServer();
- $eventDispatcher = $server->getEventDispatcher();
+ /** @var IEventDispatcher $eventDispatcher */
+ $eventDispatcher = $server->query(IEventDispatcher::class);
$notificationManager = $server->getNotificationManager();
$notificationManager->registerNotifier(function() use ($server) {
@@ -155,5 +162,10 @@ class Application extends App {
}
}
);
+
+ $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeActivityListener::class);
+ $eventDispatcher->addServiceListener(RemoteWipeStarted::class, RemoteWipeNotificationsListener::class);
+ $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeActivityListener::class);
+ $eventDispatcher->addServiceListener(RemoteWipeFinished::class, RemoteWipeNotificationsListener::class);
}
}