discourse/spec
Martin Brennan 44f15d4281
FIX: Do not email group user with user_private_message notification (#11754)
There was an issue that occurred with this order of operations:

* An IMAP topic was created by emailing a group
* A second user was invited to the topic (not the OP and not the group)
* A user with access to the group replies to the topic
* The second user receives a user_private_message notification email because of their involvement in the topic
* The second user replies to the email via email

This new reply would then go and notify the other group PM users, except for those who emailed the group topic directly, which is handled via the group SMTP mailer. However because the new post already has an incoming email because it is parsed via the Email::Receiver via POP3 the group SMTP section of the post alerter is skipped, and the group's email address is not ignored for the user_private_message notification.

This PR fixes it so the group is not ever sent an email via the PM notification. This is important because any new emails in the group's IMAP inbox will be picked up by the Imap::Sync code and created as a new topic which is not at all desirable.

Also in this PR I split up the specs a bit more for group SMTP in the post alerter to make them easier to read and they each only test one thing.
2021-01-20 10:53:08 +10:00
..
components FIX: Add Retry-Header to rate limited responses (#11736) 2021-01-19 11:35:46 +02:00
fabricators FEATURE: Do not disturb (#11484) 2020-12-18 09:03:51 -06:00
fixtures FIX: Use ImageMagick to detect animated images (#11702) 2021-01-13 19:01:30 +02:00
helpers UX: Use appropriate logo on static pages (#11211) 2020-11-12 10:50:55 -08:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
integrity DEV: Add i18n fallback specs (#11669) 2021-01-08 17:47:28 +01:00
jobs DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
lib FIX: Use ImageMagick to detect animated images (#11702) 2021-01-13 19:01:30 +02:00
mailers FIX: Ensure group SMTP and message builder always uses from address for Reply-To when IMAP is enabled (#11037) 2020-10-28 07:01:58 +10:00
models DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
multisite PERF: Improve cook_url performance for topic thumbnails (#11609) 2020-12-30 18:13:13 +00:00
requests FIX: Make sure login required skipped for confirm new email routes (#11748) 2021-01-20 10:52:25 +10:00
script/import_scripts DEV: add specs for Vanilla import script improvements (#11712) 2021-01-16 19:35:19 +05:30
serializers FIX: Users can remove themselves from a PM even if they can still access it through a group. (#11693) 2021-01-13 11:27:23 -03:00
services FIX: Do not email group user with user_private_message notification (#11754) 2021-01-20 10:53:08 +10:00
support DEV: Change Topic Timer from enqueue_at scheduled jobs to incrementally executed jobs (#11698) 2021-01-19 13:30:58 +10:00
tasks FIX: remove migrate_from_s3 task that silently corrupts data (#11703) 2021-01-17 22:33:29 +01:00
views/omniauth_callbacks FEATURE: Use full page redirection for all external auth methods (#8092) 2019-10-08 12:10:43 +01:00
rails_helper.rb DEV: Update `DB.after_commit` to be compatible with 'real' transactions (#11294) 2020-12-08 11:03:31 +11:00
swagger_helper.rb DEV: Document get user by external_id api endpoint (#11717) 2021-01-14 16:59:58 -07:00