Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVE] Don't send emails to online users and remove delay when away/idle #17907

Merged
merged 3 commits into from
Jun 15, 2020

Conversation

sampaiodiego
Copy link
Member

Proposed changes

This reverts some undesired changes introduced by #17357, so with this changes:

  • it will not send emails to connected users
  • send notifications to away users right away

Issue(s)

Closes #17492

How to test or reproduce

  • While online, receive a message and wait 2 minutes without looking anything, you will receive an email
  • Open mobile app and send it to background (the connection will be set to away), receive a message, a notification will be sent only after 2 minutes

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Hotfix (a major bugfix that has to be merged asap)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Changelog

Further comments

@sampaiodiego sampaiodiego added this to the 3.4.0 milestone Jun 13, 2020
@sampaiodiego sampaiodiego requested a review from rodrigok June 13, 2020 21:57
@sampaiodiego sampaiodiego merged commit 77aff86 into develop Jun 15, 2020
@sampaiodiego sampaiodiego deleted the improve/dont-send-email-if-online branch June 15, 2020 13:44
ggazzo added a commit that referenced this pull request Jun 17, 2020
…o threads-alpha

* 'threads-alpha' of github.com:RocketChat/Rocket.Chat: (23 commits)
  [IMPROVE][Performance] Add new database indexes to improve data query performance (#17839)
  [FIX] Undesirable message updates after user saving profile (#17930)
  Remove unused accounts-js integration (#17921)
  [IMPROVE] Don't send emails to online users and remove delay when away/idle (#17907)
  [IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables (#17669)
  correct outdated dev start info
  [IMPROVE] Rewrite Federation Dashboard (#17900)
  [FIX] Duplicated placeholderaceholder  (#17898)
  Wrap components with React.memo (#17899)
  [FIX] Some Login Buttons disappear after refreshing OAuth Services (#17808)
  Change some components' location (#17893)
  [IMPROVE] Rewrite admin sidebar in React (#17801)
  Always initialize CIRCLE_BRANCH env var on CI (#17874)
  [NEW] Blocked Media Types setting (#17617)
  [FIX] Reorder hljs (#17854)
  [FIX] SAML LogoutRequest sending wrong NameID (#17860)
  [FIX] Apps room events losing data (#17827)
  [FIX] Importers progress sending too much update events to clients (#17857)
  [FIX] Omnichannel message link is broken in email notifications (#17843)
  [FIX] Logic for room type was inverted in edit panel (#17851) (#17853)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Jun 30, 2020
@dekork
Copy link

dekork commented Jun 30, 2020

This was not fixed, I'm still getting emails. Looks like connection status isn't being used as a parameter? sendNotificationsOnMessage.js (148)

@sampaiodiego
Copy link
Member Author

this improvement was released today on 3.4.0 release.. did you update already?

@dekork
Copy link

dekork commented Jun 30, 2020

Yes I'm already on 3.4.0 and still have the issue. Isn't the parameter missing, or am I missing something?

@FredNass
Copy link

FredNass commented May 21, 2021

Hello, we're running 3.13.2 and emails are still sent to 'away' users. We dig this further and here's what we found:

  • emails are sent to 'away' users when the got set 'away' automatically (after 300s)
  • emails are not sent to users that set themselves 'away' manually.

Can someone please check the code and fix this for good? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification Email sent albeit online
4 participants