diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index ce3422b9a..d5fd91622 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -18,6 +18,7 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Http\EmptyFeaturePolicy; +use OCP\EventDispatcher\IEventDispatcher; use \OCP\IServerContainer; use OCA\Maps\Hooks\FileHooks; use OCA\Maps\Service\PhotofilesService; @@ -89,7 +90,7 @@ public function boot(IBootContext $context): void { } private function registerFeaturePolicy() { - $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); + $dispatcher = $this->getContainer()->getServer()->get(IEventDispatcher::class); $dispatcher->addListener(AddFeaturePolicyEvent::class, function (AddFeaturePolicyEvent $e) { $fp = new EmptyFeaturePolicy();