Skip to content

feat: Reaction notifications - #41701

Open
ggazzo wants to merge 1 commit into
developfrom
feat/reaction-notifications-pr
Open

feat: Reaction notifications#41701
ggazzo wants to merge 1 commit into
developfrom
feat/reaction-notifications-pr

Conversation

@ggazzo

@ggazzo ggazzo commented Aug 5, 2026

Copy link
Copy Markdown
Member

Notifies a message author when someone reacts to their message. Ported to current develop and merge-ready.

Incorporates the work by @DivyanshuVortex in #40303 (co-authored). That branch was ~466 commits behind and on an old file layout, so this is a clean reimplementation of the same feature on current develop, keeping the design decisions from the discussion there.

Closes #40303

Behavior

  • afterSetReaction hook notifies the message author when another user reacts (self-reactions skipped).
  • Reuses the existing desktop/in-app pipeline (notifyDesktopUser), gated by shouldNotifyDesktop + the recipient's room subscription → honors desktop pref, mute, busy/offline presence.
  • Body: {name} reacted with {emoji} to your message: {excerpt}; shortcode rendered as unicode via shortnameToUnicode.
  • No unread-count changes — reaction alerts don't inflate unread state.

Toggle (layered)

  • Global admin switch Reaction_Notifications_Enabled (General → Notifications, default on) — master kill switch; adds/removes the callback at runtime via settings.watch.
  • Per-user opt-out receiveReactionNotifications (default on) — Account → Preferences → Notifications.

Files

Server hook + settings (global + per-user default), per-user preference plumbing (account prefs UI, useAccountPreferencesValues, saveUserPreferences whitelist, users.setPreferences ajv schema), i18n, and a unit spec (5 cases: self-react, opt-out, no subscription, desktop gated, happy path).

Verification

  • Unit spec passes (5/5).
  • ESLint clean on touched files (0 errors).
  • rest-typings typechecks clean.
  • Full meteor tsc / e2e not run locally — relying on CI.

Summary by CodeRabbit

  • New Features

    • Added reaction notifications for message authors when others react to their messages.
    • Notifications include the reactor, reaction, and a message excerpt.
    • Added workspace and personal settings to enable or disable reaction notifications.
  • Bug Fixes

    • Notifications respect delivery eligibility, muted rooms, presence, subscriptions, and existing notification preferences.
    • Self-reactions do not trigger notifications.
    • Added localized wording for notification messages and preference options.

@ggazzo
ggazzo requested review from a team as code owners August 5, 2026 14:10
@dionisio-bot

dionisio-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7192cea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/rest-typings Minor
@rocket.chat/core-typings Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2fdef6ba-8aa1-499c-8ab7-3e340b0cf188

📥 Commits

Reviewing files that changed from the base of the PR and between 692be5e and 7192cea.

📒 Files selected for processing (11)
  • .changeset/reaction-notifications.md
  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/server/settings/accounts.ts
  • apps/meteor/server/settings/general.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • packages/i18n/src/locales/en.i18n.json
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
  • apps/meteor/server/settings/general.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • packages/i18n/src/locales/en.i18n.json
  • .changeset/reaction-notifications.md
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
  • apps/meteor/server/settings/accounts.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build

Walkthrough

This PR adds reaction notifications for message authors. It adds global and per-user controls, client and REST preference support, server-side delivery, localized text, unit tests, and release metadata.

Changes

Reaction notifications

Layer / File(s) Summary
Settings and preference surfaces
apps/meteor/server/settings/*, apps/meteor/server/meteor-methods/users/saveUserPreferences.ts, packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts, apps/meteor/client/views/account/preferences/*, packages/i18n/src/locales/en.i18n.json
Added the global setting and default user preference. Added server and REST validation. Added client preference state, a notification toggle, and translations.
Reaction notification hook
apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts, apps/meteor/server/importPackages.ts
Added reaction eligibility checks and localized desktop notification delivery. Registered or removed the callback according to the global setting.
Validation and release metadata
apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts, .changeset/reaction-notifications.md
Added tests for suppression and successful delivery cases. Documented the release behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested labels: type: feature

Sequence Diagram(s)

sequenceDiagram
  participant Reactor
  participant afterSetReaction
  participant notifyAuthorOnReaction
  participant DesktopNotification

  Reactor->>afterSetReaction: Add reaction to message
  afterSetReaction->>notifyAuthorOnReaction: Invoke reaction hook
  notifyAuthorOnReaction->>notifyAuthorOnReaction: Check author, preference, subscription, and eligibility
  notifyAuthorOnReaction->>DesktopNotification: Send localized notification
Loading
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds reaction notifications and preference controls [#40303], but omits the required unread-count increment, decrement, and reset behavior. Implement reaction unread tracking for set, unset, and mark-read flows, or update [#40303] to remove those requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: reaction notifications.
Out of Scope Changes check ✅ Passed The changes support reaction notifications, including settings, preferences, localization, API types, server logic, and tests.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Aug 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts (1)

14-14: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the implementation comment.

The self-reaction condition is clear without the comment. As per coding guidelines, avoid code comments in implementation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts` at line 14,
Remove the “skip self-reactions” implementation comment near the self-reaction
handling, leaving the surrounding logic unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts`:
- Line 59: Update the messageExcerpt assignment in notifyAuthorOnReaction to
truncate message.msg using the existing notification excerpt convention before
interpolation, while preserving the Attachment fallback for empty messages.

---

Nitpick comments:
In `@apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts`:
- Line 14: Remove the “skip self-reactions” implementation comment near the
self-reaction handling, leaving the surrounding logic unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 34b4cc54-3d4a-42ea-a060-0442d27e5fc1

📥 Commits

Reviewing files that changed from the base of the PR and between 692be5e and ae6699c.

📒 Files selected for processing (11)
  • .changeset/reaction-notifications.md
  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/server/settings/accounts.ts
  • apps/meteor/server/settings/general.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • packages/i18n/src/locales/en.i18n.json
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/server/importPackages.ts
  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
  • apps/meteor/server/settings/general.ts
  • apps/meteor/server/settings/accounts.ts
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
**/*.spec.ts

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
🧠 Learnings (10)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/settings/general.ts
  • apps/meteor/server/settings/accounts.ts
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/settings/general.ts
  • apps/meteor/server/settings/accounts.ts
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/server/importPackages.ts
  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
  • apps/meteor/server/settings/general.ts
  • apps/meteor/server/settings/accounts.ts
  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
  • apps/meteor/server/meteor-methods/users/saveUserPreferences.ts
  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
  • apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
📚 Learning: 2026-03-27T14:52:56.865Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 39892
File: apps/meteor/client/views/room/contextualBar/Threads/Thread.tsx:150-155
Timestamp: 2026-03-27T14:52:56.865Z
Learning: In Rocket.Chat, there are two different `ModalBackdrop` components with different prop APIs. During review, confirm the import source: (1) `rocket.chat/fuselage` `ModalBackdrop` uses `ModalBackdropProps` based on `BoxProps` (so it supports `onClick` and other Box/DOM props) and does not have an `onDismiss` prop; (2) `rocket.chat/ui-client` `ModalBackdrop` uses a narrower props interface like `{ children?: ReactNode; onDismiss?: () => void }` and handles Escape keypress and outside mouse-up, and it does not forward arbitrary DOM props such as `onClick`. Flag mismatched props (e.g., `onDismiss` passed to the fuselage component or `onClick` passed to the ui-client component) and ensure the usage matches the correct component being imported.

Applied to files:

  • apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx
📚 Learning: 2026-03-16T21:50:37.589Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:37.589Z
Learning: For changes related to OpenAPI migrations in Rocket.Chat/OpenAPI, when removing endpoint types and validators from rocket.chat/rest-typings (e.g., UserRegisterParamsPOST, /v1/users.register) document this as a minor changeset (not breaking) per RocketChat/Rocket.Chat-Open-API#150 Rule 7. Note that the endpoint type is re-exposed via a module augmentation .d.ts in the consuming package (e.g., packages/web-ui-registration/src/users-register.d.ts). In reviews, ensure the changeset clearly states: this is a non-breaking change, the major version should not be bumped, and the changeset reflects a minor version bump. Do not treat this as a breaking change during OpenAPI migrations.

Applied to files:

  • .changeset/reaction-notifications.md
📚 Learning: 2026-05-11T23:14:59.316Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 40469
File: packages/rest-typings/src/v1/users.ts:337-337
Timestamp: 2026-05-11T23:14:59.316Z
Learning: In Rocket.Chat REST endpoint typings (e.g., packages/rest-typings/src/v1/users.ts and other rest-typings files), keep the established convention of deriving field types from the domain model (e.g., use IUser indexed access like IUser['statusExpiresAt']) rather than swapping individual fields to serialized primitives (like string) in an ad-hoc way. If a truly different “serialized” representation is needed, perform the refactor consistently across the codebase (not just a single endpoint/field) and ensure all related REST typings stay aligned with the shared serialization types.

Applied to files:

  • packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.

Applied to files:

  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.

Applied to files:

  • apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts
📚 Learning: 2026-02-10T16:32:42.586Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38528
File: apps/meteor/client/startup/roles.ts:14-14
Timestamp: 2026-02-10T16:32:42.586Z
Learning: In Rocket.Chat's Meteor client code, DDP streams use EJSON and Date fields arrive as Date objects; do not manually construct new Date() in stream handlers (for example, in sdk.stream()). Only REST API responses return plain JSON where dates are strings, so implement explicit conversion there if needed. Apply this guidance to all TypeScript files under apps/meteor/client to ensure consistent date handling in DDP streams and REST responses.

Applied to files:

  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
📚 Learning: 2026-05-11T20:30:35.265Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 40480
File: apps/meteor/client/meteor/startup/accounts.ts:59-61
Timestamp: 2026-05-11T20:30:35.265Z
Learning: In Rocket.Chat’s Meteor client code, when calling `dispatchToastMessage` with `{ type: 'error' }`, pass the raw caught error object as `message` without manual normalization. `dispatchToastMessage` is designed to accept `message: unknown` for error toasts, so avoid converting errors to strings (e.g., `String(error)`) or extracting `error.message` before passing them.

Applied to files:

  • apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts
🔇 Additional comments (12)
apps/meteor/server/settings/general.ts (1)

298-302: LGTM!

apps/meteor/server/settings/accounts.ts (1)

467-471: LGTM!

apps/meteor/server/meteor-methods/users/saveUserPreferences.ts (1)

56-56: LGTM!

Also applies to: 133-133

packages/rest-typings/src/v1/users/UsersSetPreferenceParamsPOST.ts (2)

273-276: 🗄️ Data Integrity & Integration

Verify REST null handling.

The schema accepts receiveReactionNotifications: null. apps/meteor/server/meteor-methods/users/saveUserPreferences.ts accepts only an omitted value or a boolean. If the REST handler forwards data unchanged, validation succeeds at the REST boundary and fails in the Meteor method. Remove nullable or normalize null before storage validation.


56-56: LGTM!

apps/meteor/client/views/account/preferences/useAccountPreferencesValues.ts (1)

42-42: LGTM!

Also applies to: 83-83, 116-116

apps/meteor/client/views/account/preferences/PreferencesNotificationsSection.tsx (1)

146-155: LGTM!

packages/i18n/src/locales/en.i18n.json (1)

4505-4507: LGTM!

Also applies to: 4529-4529

apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts (1)

1-13: LGTM!

Also applies to: 15-58, 60-84

apps/meteor/server/importPackages.ts (1)

56-56: LGTM!

apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts (1)

1-86: LGTM!

.changeset/reaction-notifications.md (1)

1-6: LGTM!

Comment thread apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts
@ggazzo
ggazzo force-pushed the feat/reaction-notifications-pr branch from ae6699c to 8a3bda5 Compare August 5, 2026 14:20
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@ggazzo ggazzo added this to the 8.8.0 milestone Aug 5, 2026
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.61%. Comparing base (692be5e) to head (7192cea).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41701      +/-   ##
===========================================
- Coverage    68.64%   68.61%   -0.03%     
===========================================
  Files         4164     4165       +1     
  Lines       158957   158989      +32     
  Branches     28160    28213      +53     
===========================================
- Hits        109113   109092      -21     
- Misses       44678    44716      +38     
- Partials      5166     5181      +15     
Flag Coverage Δ
unit 70.51% <78.12%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/meteor/server/hooks/messages/notifyAuthorOnReaction.ts Outdated
Comment thread apps/meteor/tests/unit/server/hooks/messages/notifyAuthorOnReaction.spec.ts Outdated
@ggazzo
ggazzo force-pushed the feat/reaction-notifications-pr branch from 8a3bda5 to b09c285 Compare August 5, 2026 14:42
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Sends a desktop/in-app notification to a message's author when another
user reacts to it, reusing the existing notification pipeline.

Delivery goes through notifyDesktopUser and is gated by shouldNotifyDesktop
plus the recipient's room subscription, so it honors the desktop
notification preference, mute, and busy/offline presence. Self-reactions
are skipped. The emoji shortcode is rendered as unicode and the body
includes an excerpt of the reacted message.

Toggle is layered:
- Global admin switch 'Reaction_Notifications_Enabled' (default on) as a
  master kill switch that adds/removes the callback at runtime.
- Per-user 'receiveReactionNotifications' preference (default on) exposed
  in Account > Preferences > Notifications for individual opt-out.

Co-authored-by: Divyanshu <divyanshuchandra9027@gmail.com>
@ggazzo
ggazzo force-pushed the feat/reaction-notifications-pr branch from b09c285 to 7192cea Compare August 5, 2026 14:55
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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

Labels

type: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant