|
24 | 24 | use OCA\AppAPI\Notifications\ExAppNotifier; |
25 | 25 | use OCA\AppAPI\PublicCapabilities; |
26 | 26 | use OCA\AppAPI\SetupChecks\DaemonCheck; |
| 27 | +use OCA\DAV\Events\SabrePluginAddEvent; |
27 | 28 | use OCA\DAV\Events\SabrePluginAuthInitEvent; |
28 | 29 | use OCA\Files\Event\LoadAdditionalScriptsEvent; |
29 | 30 | use OCP\AppFramework\App; |
|
32 | 33 | use OCP\AppFramework\Bootstrap\IRegistrationContext; |
33 | 34 | use OCP\EventDispatcher\IEventDispatcher; |
34 | 35 | use OCP\Navigation\Events\LoadAdditionalEntriesEvent; |
35 | | -use OCP\SabrePluginEvent; |
36 | 36 | use OCP\Settings\Events\DeclarativeSettingsGetValueEvent; |
37 | 37 | use OCP\Settings\Events\DeclarativeSettingsRegisterFormEvent; |
38 | 38 | use OCP\Settings\Events\DeclarativeSettingsSetValueEvent; |
@@ -77,9 +77,9 @@ public function boot(IBootContext $context): void { |
77 | 77 | public function registerDavAuth(): void { |
78 | 78 | $container = $this->getContainer(); |
79 | 79 |
|
80 | | - $dispatcher = $container->query(IEventDispatcher::class); |
81 | | - $dispatcher->addListener('OCA\DAV\Connector\Sabre::addPlugin', function (SabrePluginEvent $event) use ($container) { |
82 | | - $event->getServer()->addPlugin($container->query(DavPlugin::class)); |
| 80 | + $dispatcher = $container->get(IEventDispatcher::class); |
| 81 | + $dispatcher->addListener(SabrePluginAddEvent::class, function (SabrePluginAddEvent $event) use ($container) { |
| 82 | + $event->getServer()->addPlugin($container->get(DavPlugin::class)); |
83 | 83 | }); |
84 | 84 | } |
85 | 85 | } |
0 commit comments