Skip to content

Commit

Permalink
fix (dispatcher): use IEventDispatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey18106 committed Aug 7, 2023
1 parent 3ac723f commit 322d536
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Profiler\IProfiler;
use OCP\SabrePluginEvent;

Expand Down Expand Up @@ -60,7 +61,7 @@ public function boot(IBootContext $context): void {
public function registerDavAuth(): void {
$container = $this->getContainer();

$dispatcher = $container->getServer()->getEventDispatcher();
$dispatcher = $container->query(IEventDispatcher::class);
$dispatcher->addListener('OCA\DAV\Connector\Sabre::addPlugin', function (SabrePluginEvent $event) use ($container) {
$event->getServer()->addPlugin($container->query(DavPlugin::class));
});
Expand Down

0 comments on commit 322d536

Please sign in to comment.