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] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables #17669

Merged
merged 3 commits into from
Jun 13, 2020
Merged

[IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables #17669

merged 3 commits into from
Jun 13, 2020

Conversation

jazztickets
Copy link
Contributor

@jazztickets jazztickets commented May 17, 2020

Proposed changes

This patch builds upon PR #17357 by allowing the notification delay to be customized for 'online', 'away' and 'offline' statuses via environment variables. It also allows each notification type to be disabled by setting the delay to -1.

Issue(s)

This aims to fix issue #17492, although a proper fix would allow it to be configured via the Admin section. The problem is most users don't want to be emailed when they're online, regardless if they've read the messages or not. The current workaround is setting NOTIFICATIONS_SCHEDULE_DELAY to an extremely high value, though that doesn't really solve the issue.

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

Now the email notification delay can now be customized with the following environment variables:

  • NOTIFICATIONS_SCHEDULE_DELAY_ONLINE
  • NOTIFICATIONS_SCHEDULE_DELAY_AWAY
  • NOTIFICATIONS_SCHEDULE_DELAY_OFFLINE

Setting the value to -1 disable notifications for that type.

jazztickets and others added 3 commits May 17, 2020 09:41
…ariables for the statuses 'online', 'away', and 'offline'. This change also allows disabling the scheduled notification for each status by setting the delay to -1.
Copy link
Member

@sampaiodiego sampaiodiego left a comment

Choose a reason for hiding this comment

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

This is interesting, thanks for your contribution.. I have some additional changes to this, but I don't see any reason to not merge this. Thanks again =)

@sampaiodiego sampaiodiego merged commit d504638 into RocketChat:develop Jun 13, 2020
@jazztickets jazztickets deleted the notification-delay-split branch June 13, 2020 21:53
@rodrigok rodrigok added this to the 3.4.0 milestone Jun 15, 2020
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
@rodrigok rodrigok changed the title [IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables [IMPROVE] Split NOTIFICATIONS_SCHEDULE_DELAY into three separate variables Jul 3, 2020
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.

3 participants