Skip to content

fix(comments): register event listener for typed comment events#7894

Open
miaulalala wants to merge 1 commit intomainfrom
fix/comments-event-listener-registration-new
Open

fix(comments): register event listener for typed comment events#7894
miaulalala wants to merge 1 commit intomainfrom
fix/comments-event-listener-registration-new

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@miaulalala miaulalala commented Apr 25, 2026

Summary

Since the typed comment events (CommentAddedEvent, CommentUpdatedEvent, etc.) were introduced in NC34, dispatchTyped() dispatches using the exact subclass name. Registering only for CommentsEvent::class means the listener never fires, so comment mentions in Deck cards never create notifications or activity entries.

Update tests to use typed events directly, matching how Manager now dispatches them.

Changes were introduced in nextcloud/server#56076

AI-Assisted-By: Claude Sonnet 4.6 noreply@anthropic.com

  • Target version: main

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

Since the typed comment events (CommentAddedEvent, CommentUpdatedEvent,
etc.) were introduced in NC34, dispatchTyped() dispatches using the exact
subclass name. Registering only for CommentsEvent::class means the listener
never fires, so comment mentions in Deck cards never create notifications
or activity entries.

Update tests to use typed events directly, matching how Manager now
dispatches them.

AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the fix/comments-event-listener-registration-new branch from 951459a to 4b48d24 Compare April 25, 2026 11:16
@github-actions
Copy link
Copy Markdown
Contributor

🐢 Performance warning.
It looks like the query count of the integration tests increased with this PR.
Database query count is now 96888 was 93102 (+4.06%)
Please check your code again. If you added a new test this can be expected and the base value in tests/integration/base-query-count.txt can be increased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant