diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index c61b92ad6..0b0bf37e1 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -53,7 +53,7 @@ use OCP\Files\Template\TemplateFileCreator;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IPreview;
-use OCP\Preview\BeforeFetchPreviewEvent;
+use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Security\CSP\AddContentSecurityPolicyEvent;
class Application extends App implements IBootstrap {
@@ -72,7 +72,7 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class);
$context->registerEventListener(LoadViewer::class, LoadViewerListener::class);
$context->registerEventListener(ShareLinkAccessedEvent::class, ShareLinkListener::class);
- $context->registerEventListener(BeforeFetchPreviewEvent::class, BeforeFetchPreviewListener::class);
+ $context->registerEventListener(BeforePreviewFetchedEvent::class, BeforeFetchPreviewListener::class);
}
public function boot(IBootContext $context): void {
diff --git a/lib/Listener/BeforeFetchPreviewListener.php b/lib/Listener/BeforeFetchPreviewListener.php
index 20163f15c..38827d034 100644
--- a/lib/Listener/BeforeFetchPreviewListener.php
+++ b/lib/Listener/BeforeFetchPreviewListener.php
@@ -33,7 +33,7 @@ use OCP\EventDispatcher\IEventListener;
use OCP\Files\NotFoundException;
use OCP\IRequest;
use OCP\IUserSession;
-use OCP\Preview\BeforeFetchPreviewEvent;
+use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -52,7 +52,7 @@ class BeforeFetchPreviewListener implements IEventListener {
}
public function handle(Event $event): void {
- if (!$event instanceof BeforeFetchPreviewEvent) {
+ if (!$event instanceof BeforePreviewFetchedEvent) {
return;
}
$shareToken = $this->request->getParam('token');
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index bf7f35c24..5c4916099 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -23,7 +23,7 @@
Pdf
- BeforeFetchPreviewEvent
+ BeforePreviewFetchedEvent
@@ -154,7 +154,7 @@
- BeforeFetchPreviewEvent
+ BeforePreviewFetchedEvent