2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FEATURE: setting to only use the key when finding the related post of an email reply

this fixes email-in threading problems when using a SMTP server which modifies the message_id
header, like Amazon SES
This commit is contained in:
Leo McArdle 2017-06-19 12:12:55 +01:00
parent 2bf2d506bf
commit 5e0efb3410
3 changed files with 6 additions and 0 deletions

View file

@ -486,6 +486,8 @@ module Email
end
def find_related_post
return if SiteSetting.find_related_post_with_key
message_ids = [@mail.in_reply_to, Email::Receiver.extract_references(@mail.references)]
message_ids.flatten!
message_ids.select!(&:present?)