Merge pull request #59909 from nextcloud/fix/comments-event-listener-registration

fix(comments): register event listener for typed comment events
This commit is contained in:
Joas Schilling 2026-05-04 21:54:37 +02:00 committed by GitHub
commit 0ff0136973
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,7 +23,10 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Comments\CommentsEntityEvent;
use OCP\Comments\CommentsEvent;
use OCP\Comments\Events\BeforeCommentUpdatedEvent;
use OCP\Comments\Events\CommentAddedEvent;
use OCP\Comments\Events\CommentDeletedEvent;
use OCP\Comments\Events\CommentUpdatedEvent;
class Application extends App implements IBootstrap {
public const APP_ID = 'comments';
@ -49,7 +52,19 @@ class Application extends App implements IBootstrap {
CommentsEntityEventListener::class
);
$context->registerEventListener(
CommentsEvent::class,
CommentAddedEvent::class,
CommentsEventListener::class,
);
$context->registerEventListener(
BeforeCommentUpdatedEvent::class,
CommentsEventListener::class,
);
$context->registerEventListener(
CommentUpdatedEvent::class,
CommentsEventListener::class,
);
$context->registerEventListener(
CommentDeletedEvent::class,
CommentsEventListener::class,
);