fix(dav): Move DAV app to non deprecated event dispatcher

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/39190/head
Joas Schilling 2023-07-06 10:52:19 +07:00
parent a9ba19d3d4
commit f59c74062a
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
2 changed files with 4 additions and 3 deletions

@ -71,6 +71,7 @@ use OCA\DAV\Events\CardDeletedEvent;
use OCA\DAV\Events\CardUpdatedEvent;
use OCA\DAV\Events\SubscriptionCreatedEvent;
use OCA\DAV\Events\SubscriptionDeletedEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Federation\Events\TrustedServerRemovedEvent;
use OCA\DAV\HookManager;
use OCA\DAV\Listener\ActivityUpdaterListener;
@ -215,7 +216,7 @@ class Application extends App implements IBootstrap {
}
public function registerHooks(HookManager $hm,
EventDispatcherInterface $dispatcher,
IEventDispatcher $dispatcher,
IAppContainer $container,
IServerContainer $serverContainer) {
$hm->setup();
@ -227,7 +228,7 @@ class Application extends App implements IBootstrap {
}
});
$dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($container) {
$dispatcher->addListener('OC\AccountManager::userUpdated', function ($event) use ($container) {
$user = $event->getSubject();
/** @var SyncService $syncService */
$syncService = $container->query(SyncService::class);

@ -2841,7 +2841,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$calendarId = $shareable->getResourceId();
$calendarRow = $this->getCalendarById($calendarId);
if ($calendarRow === null) {
throw new \RuntimeException('Trying to update shares for innexistant calendar: ' . $calendarId);
throw new \RuntimeException('Trying to update shares for non-existing calendar: ' . $calendarId);
}
$oldShares = $this->getShares($calendarId);