Skip to content

Commit 2ec13d4

Browse files
authored
Merge pull request #60149 from nextcloud/backport/59909/stable33
[stable33] fix(comments): register event listener for typed comment events
2 parents 912ae3f + 3bef50d commit 2ec13d4

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
@@ -21,7 +21,10 @@
2121
use OCP\AppFramework\Bootstrap\IBootstrap;
2222
use OCP\AppFramework\Bootstrap\IRegistrationContext;
2323
use OCP\Comments\CommentsEntityEvent;
24-
use OCP\Comments\CommentsEvent;
24+
use OCP\Comments\Events\BeforeCommentUpdatedEvent;
25+
use OCP\Comments\Events\CommentAddedEvent;
26+
use OCP\Comments\Events\CommentDeletedEvent;
27+
use OCP\Comments\Events\CommentUpdatedEvent;
2528

2629
class Application extends App implements IBootstrap {
2730
public const APP_ID = 'comments';
@@ -46,7 +49,19 @@ public function register(IRegistrationContext $context): void {
4649
CommentsEntityEventListener::class
4750
);
4851
$context->registerEventListener(
49-
CommentsEvent::class,
52+
CommentAddedEvent::class,
53+
CommentsEventListener::class,
54+
);
55+
$context->registerEventListener(
56+
BeforeCommentUpdatedEvent::class,
57+
CommentsEventListener::class,
58+
);
59+
$context->registerEventListener(
60+
CommentUpdatedEvent::class,
61+
CommentsEventListener::class,
62+
);
63+
$context->registerEventListener(
64+
CommentDeletedEvent::class,
5065
CommentsEventListener::class,
5166
);
5267

0 commit comments

Comments
 (0)