discourse/spec
Martin Brennan e9dc88a7b6
FIX: Link up reply to post correctly when emailing group (#13339)
When replying to a user_private_message email originating from
a group PM that does _not_ have a reply key (e.g. when replying
directly to the group's SMTP address), we were mistakenly linking
the new post created from the reply to the OP and the user who
created the topic, based on the first IncomingEmail message ID in
the topic, rather than using the correct reply to user and post number
that the user actually replied to.

We now use the In-Reply-To header to look up the corresponding EmailLog
record when the user who replied was sent a user_private_message email,
and use the post from that as the reply_to_user/post.

This also removes superfluous filtering of incoming_email records. After
already filtering by message_id and then addressed_to_user (which only
returns incoming emails where the to, from, or cc address includes any
of the user's emails), we were filtering again but in the ruby code for
the exact same conditions. After removing this all existing tests still
pass.
2021-06-10 15:28:50 +10:00
..
components FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
fabricators FEATURE: Improve group email settings UI (#13083) 2021-05-28 09:28:18 +10:00
fixtures FIX: Link up reply to post correctly when emailing group (#13339) 2021-06-10 15:28:50 +10:00
helpers A11Y: sets the html lang to user's locale when possible (#12007) 2021-02-10 16:12:09 +01:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FEATURE: A low priority filter for the review queue. (#12822) 2021-04-23 15:34:24 -03:00
integration FEATURE: Add global admin api key rate limiter (#12527) 2021-06-03 10:52:43 +01:00
integrity DEV: Fix a flaky Onceoff spec (#13314) 2021-06-07 20:38:31 +02:00
jobs DEV: ensure user export ordering is predictable (#13340) 2021-06-09 15:55:52 +10:00
lib FEATURE: Add upgrade-insecure-requests to CSP when force_https is enabled (#13348) 2021-06-10 10:53:10 +10:00
mailers FIX: Do not enqueue :group_smtp_email job if IMAP disabled for the group (#13307) 2021-06-07 14:17:35 +10:00
models DEV: Fix flaky test due to locale cache poisoning 2021-06-08 13:13:38 +10:00
multisite FEATURE: Use path from existing URL of uploads and optimized images (#13177) 2021-05-27 17:42:25 +02:00
requests FIX: Theme tests should work in production (#13333) 2021-06-08 22:03:59 +03:00
script/import_scripts DEV: If disabled do not change setting after import (#12142) 2021-02-19 09:33:35 -07:00
serializers FEATURE: enable tagging by default (#13175) 2021-06-07 18:07:46 +03:00
services FIX: Handle timeout errors when sending push notifications (#13312) 2021-06-07 20:46:07 +02:00
support DEV: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
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: Absorb onebox gem into core (#12979) 2021-05-26 15:11:35 +05:30
swagger_helper.rb api docs example (#11997) 2021-02-08 10:09:44 -07:00