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

[FIX] Email notifications were still being sent for online users #18088

Merged
merged 4 commits into from
Jul 1, 2020

Conversation

dekork
Copy link

@dekork dekork commented Jun 30, 2020

Add the missing the statusConnection parameter, which should prevent emails being sent if user is online. Fixes PR #17907

Proposed changes

Add missing parameter receiver.statusConnection to shouldNotifyEmail function.

Issue(s)

#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

The previous PR had added a new parameter, but this is not being used when called. I have not done any tests locally, hoping some one else can do this and accept this PR to finally fix these spam of notification emails.

Missing the statusConnection parameter, and not preventing emails being sent if online.
@dekork dekork changed the title Fix missing statusConnection parameter [FIX] Add missing statusConnection parameter Jun 30, 2020
@lgtm-com
Copy link

lgtm-com bot commented Jun 30, 2020

This pull request introduces 1 alert when merging 8418f0d into 986d2a7 - view on LGTM.com

new alerts:

  • 1 for Syntax error

@rodrigok rodrigok added this to the 3.4.1 milestone Jul 1, 2020
@rodrigok
Copy link
Member

rodrigok commented Jul 1, 2020

@Densik thanks for your contribution, we gonna release a patch ASAP.

@rodrigok rodrigok changed the title [FIX] Add missing statusConnection parameter [FIX] Email notifications were still being sent for online users Jul 1, 2020
@rodrigok rodrigok merged commit b7e7ebe into RocketChat:develop Jul 1, 2020
@sampaiodiego sampaiodiego mentioned this pull request Jul 2, 2020
gabriellsh added a commit that referenced this pull request Jul 6, 2020
…into new/rewrite_account_profile

* 'rewrite/accounts' of github.com:RocketChat/Rocket.Chat:
  [FIX] Cannot open admin when server uses ROOT_URL with subpath (#18105) (#18147)
  [FIX] App details returns to apps table, instead of previous page (#18080)
  [FIX] Clipboard not working when permalinking a pinned message (#18047)
  [FIX] "Add reaction" icon missing when the viewport size is smaller than 500px (#18110)
  [FIX] Jitsi opening twice (#18111)
  [FIX] Email notifications were still being sent for online users (#18088)
  [FIX] The livechat agent activity monitor wasn't being initialised because due to an internal error (#18090)
gabriellsh added a commit that referenced this pull request Jul 6, 2020
…ocket.Chat into rewrite/user_preferences

* 'new/rewrite_account_profile' of github.com:RocketChat/Rocket.Chat:
  [FIX] Cannot open admin when server uses ROOT_URL with subpath (#18105) (#18147)
  [FIX] App details returns to apps table, instead of previous page (#18080)
  [FIX] Clipboard not working when permalinking a pinned message (#18047)
  [FIX] "Add reaction" icon missing when the viewport size is smaller than 500px (#18110)
  [FIX] Jitsi opening twice (#18111)
  [FIX] Email notifications were still being sent for online users (#18088)
  [FIX] The livechat agent activity monitor wasn't being initialised because due to an internal error (#18090)
@rikatz
Copy link

rikatz commented Jul 7, 2020

After this patch the email stopped working at all for us ;(

The SMTP test works fine, but offline users doesn't get email even if they configure in their preferences

@rodrigok
Copy link
Member

rodrigok commented Jul 7, 2020

@rikatz I'll double check this, we are facing some other issues that may be related and we are going to release a patch 3.4.2 ASAP

@pierre-lehnen-rc
Copy link
Contributor

@rikatz is none of your users receiving the emails? can you confirm that their connection status is really offline? this change shouldn't have broken anything unless the status is somehow stuck as online.

@dekork
Copy link
Author

dekork commented Jul 7, 2020

@pierre-lehnen-rc Thanks for chiming in, that's what I thought too. Maybe there's something else causing incorrect connection statuses. Do they use any other/multiple clients at once like the mobile app maybe? Maybe the issue lies there, I'm not sure.

@rikatz
Copy link

rikatz commented Jul 7, 2020

I've asked for a user to logoff from his mobile and also from the chat but no message received. Will ping them tomorrow :)

ggazzo added a commit that referenced this pull request Jul 28, 2020
* [FIX] Jitsi opening twice (#18111)

* [FIX] "Add reaction" icon missing when the viewport size is smaller than 500px (#18110)

* [FIX] Avatar ETag missing from User (#18109)

* Handle callback returning promise. (#18102)

* [FIX] Not possible to read encrypted messages after disable E2E on channel level (#18101)

* [FIX] The livechat agent activity monitor wasn't being initialised because due to an internal error (#18090)

* [FIX] Email notifications were still being sent for online users (#18088)

* Bump version to 3.4.1

* [FIX] App details returns to apps table, instead of previous page (#18080)

* [FIX] Cannot open admin when server uses ROOT_URL with subpath (#18105) (#18147)

* [FIX] Old Data Migrations breaking upgrades (#18185)

* [FIX] Application not loading due to reverse proxy decoding API calls unnecessarily (#18222)

* [FIX] SAML login crashing when receiving an array of roles (#18224)

* [FIX] CAS login not merging users with local accounts (#18238)

* Bump version to 3.4.2

* Bump version to 3.5.0-rc.0

* Bump version to 3.5.0-rc.1

* Bump version to 3.5.0-rc.2

* Bump version to 3.5.0-rc.3

* Bump version to 3.5.0-rc.4

* Bump version to 3.5.0

* Bump version to 3.6.0-develop

Co-authored-by: Guilherme Gazzo <guilhermegazzo@gmail.com>
Co-authored-by: Maria Eduarda Cunha <42151808+mariaeduardacunha@users.noreply.github.com>
Co-authored-by: gabriellsh <40830821+gabriellsh@users.noreply.github.com>
Co-authored-by: Renato Becker <renato.augusto.becker@gmail.com>
Co-authored-by: Rodrigo Nascimento <rodrigoknascimento@gmail.com>
Co-authored-by: Paulo Bernardo <paulo.bernardo@ilhasoft.com.br>
Co-authored-by: Denis <densik@users.noreply.github.com>
Co-authored-by: Omar Chehab <omarchehab98@gmail.com>
Co-authored-by: pierre-lehnen-rc <55164754+pierre-lehnen-rc@users.noreply.github.com>
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.

5 participants