mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:51:07 +08:00
FEATURE: Use Message-ID for detecting email replies to group
Ignores the site setting "find_related_post_with_key" and always tries to honor the `In-Reply-To` and `References` header for emails sent to a group. The senders email address must be included in the `To` or `CC` header of a previous email sent to the group and the `Message-ID` of that email must be included in the current email's `In-Reply-To` or `References` header.
This commit is contained in:
@ -197,11 +197,7 @@ module ImportScripts::Mbox
|
||||
end
|
||||
|
||||
def extract_reply_message_ids(mail)
|
||||
message_ids = [mail.in_reply_to, Email::Receiver.extract_references(mail.references)]
|
||||
message_ids.flatten!
|
||||
message_ids.select!(&:present?)
|
||||
message_ids.uniq!
|
||||
message_ids.first(20)
|
||||
Email::Receiver.extract_reply_message_ids(mail, max_message_id_count: 20)
|
||||
end
|
||||
|
||||
def extract_subject(receiver, list_name)
|
||||
|
Reference in New Issue
Block a user