Skip to content

Conversation

@sampaiodiego
Copy link
Member

@sampaiodiego sampaiodiego commented Apr 22, 2025

Proposed changes (including videos or screenshots)

The way the notification queue works depends on the user's status, if the user was idle/offline there is no delay to send the notification, so schedule is undefined and previously (before #31497) it was being ignored and not added to the record, so queries like schedule: { $exists: false } would work.. but since then the code was saving schedule: undefined which caused that query to not work as expected, causing the notification issue.

Issue(s)

Introduced by #31497

Steps to test or reproduce

Further comments

Copilot AI review requested due to automatic review settings April 22, 2025 14:11
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Apr 22, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Apr 22, 2025

⚠️ No Changeset found

Latest commit: 3a644df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@sampaiodiego sampaiodiego added this to the 7.6.0 milestone Apr 22, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a regression issue by ensuring that notifications are sent correctly when the user is offline. The key change conditionally includes the schedule property when it is truthy, preventing unintended behavior.

Comments suppressed due to low confidence (1)

apps/meteor/app/notification-queue/server/NotificationQueue.ts:172

  • Review whether the conditional spread operator correctly handles all cases for schedule. Verify that this change addresses the offline notification issue without inadvertently omitting necessary scheduling data.
...(schedule && { schedule }),

@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Apr 22, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 22, 2025
@sampaiodiego sampaiodiego changed the title regression: fix notifications not being sent if user is offline regression: fix notifications not being sent if user is idle or offline Apr 22, 2025
@github-actions
Copy link
Contributor

PR Preview Action v1.6.1

🚀 View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35849/

Built to branch gh-pages at 2025-04-22 14:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.09%. Comparing base (28c8dcc) to head (3a644df).
Report is 1 commits behind head on release-7.6.0.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-7.6.0   #35849      +/-   ##
=================================================
- Coverage          61.16%   61.09%   -0.07%     
=================================================
  Files               3003     3005       +2     
  Lines              71350    71432      +82     
  Branches           16333    16368      +35     
=================================================
+ Hits               43638    43639       +1     
- Misses             24746    24824      +78     
- Partials            2966     2969       +3     
Flag Coverage Δ
e2e 57.86% <ø> (-0.02%) ⬇️
e2e-api 35.61% <ø> (-0.25%) ⬇️
unit 74.99% <ø> (ø)

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.

@kodiakhq kodiakhq bot merged commit 59e3541 into release-7.6.0 Apr 22, 2025
45 checks passed
@kodiakhq kodiakhq bot deleted the regression-notifications-not-being-sent branch April 22, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants