Skip to content

Commit 0ff0136

Browse files
Merge pull request #59909 from nextcloud/fix/comments-event-listener-registration
fix(comments): register event listener for typed comment events
2 parents 456c3ab + 9700875 commit 0ff0136

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

apps/comments/lib/AppInfo/Application.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
use OCP\AppFramework\Bootstrap\IBootstrap;
2424
use OCP\AppFramework\Bootstrap\IRegistrationContext;
2525
use OCP\Comments\CommentsEntityEvent;
26-
use OCP\Comments\CommentsEvent;
26+
use OCP\Comments\Events\BeforeCommentUpdatedEvent;
27+
use OCP\Comments\Events\CommentAddedEvent;
28+
use OCP\Comments\Events\CommentDeletedEvent;
29+
use OCP\Comments\Events\CommentUpdatedEvent;
2730

2831
class Application extends App implements IBootstrap {
2932
public const APP_ID = 'comments';
@@ -49,7 +52,19 @@ public function register(IRegistrationContext $context): void {
4952
CommentsEntityEventListener::class
5053
);
5154
$context->registerEventListener(
52-
CommentsEvent::class,
55+
CommentAddedEvent::class,
56+
CommentsEventListener::class,
57+
);
58+
$context->registerEventListener(
59+
BeforeCommentUpdatedEvent::class,
60+
CommentsEventListener::class,
61+
);
62+
$context->registerEventListener(
63+
CommentUpdatedEvent::class,
64+
CommentsEventListener::class,
65+
);
66+
$context->registerEventListener(
67+
CommentDeletedEvent::class,
5368
CommentsEventListener::class,
5469
);
5570

0 commit comments

Comments
 (0)