aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Comments/Manager.php3
-rw-r--r--lib/public/Comments/ICommentsEventHandler.php2
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Comments/Manager.php b/lib/private/Comments/Manager.php
index e3d40f2d965..21ff5322f23 100644
--- a/lib/private/Comments/Manager.php
+++ b/lib/private/Comments/Manager.php
@@ -16,6 +16,7 @@ use OCP\Comments\ICommentsEventHandler;
use OCP\Comments\ICommentsManager;
use OCP\Comments\NotFoundException;
use OCP\DB\QueryBuilder\IQueryBuilder;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\FileInfo;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
@@ -49,6 +50,7 @@ class Manager implements ICommentsManager {
protected IEmojiHelper $emojiHelper,
protected IInitialStateService $initialStateService,
protected IRootFolder $rootFolder,
+ protected IEventDispatcher $eventDispatcher,
) {
}
@@ -1529,6 +1531,7 @@ class Manager implements ICommentsManager {
foreach ($entities as $entity) {
$entity->handle($event);
}
+ $this->eventDispatcher->dispatchTyped($event);
}
/**
diff --git a/lib/public/Comments/ICommentsEventHandler.php b/lib/public/Comments/ICommentsEventHandler.php
index af36e051b5f..dc0a554ff11 100644
--- a/lib/public/Comments/ICommentsEventHandler.php
+++ b/lib/public/Comments/ICommentsEventHandler.php
@@ -9,11 +9,13 @@ namespace OCP\Comments;
* Interface ICommentsEventHandler
*
* @since 11.0.0
+ * @deprecated 30.0.0 Register a listener for the CommentsEvent through the IEventDispatcher
*/
interface ICommentsEventHandler {
/**
* @param CommentsEvent $event
* @since 11.0.0
+ * @deprecated 30.0.0 Register a listener for the CommentsEvent through the IEventDispatcher
*/
public function handle(CommentsEvent $event);
}