Skip to content

Commit

Permalink
Removed getEventDispatcher()
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Hamann <[email protected]>
  • Loading branch information
tacruc committed Dec 12, 2023
1 parent b4cce34 commit 6127b12
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 @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

1 comment on commit 6127b12

@PriceChild
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see this (in v1.3.1) has stopped my logs being spammed after updating to Nextcloud Hub 7! Thanks!

Please sign in to comment.