Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2018-07-27 15:10:18 +0300
committerToon Claes <toon@gitlab.com>2018-07-27 16:12:52 +0300
commitb1f236164e835a8d21bc19c343c9e211fdcb65b6 (patch)
treebf69069a2b6809d27655e27163cc74d6338429a3 /app/mailers
parent2fbafe1a41f846a5fd6a58d27f9fb16484edb070 (diff)
Put fallback reply-key address first in the References header
The References header is an ordered list of mails, and some clients only look at the last mail in the list to determine to which mail the mail is in reply to. Therefore, to be a less obtrusive as possible, put the fallback address first. Some info about the reply key lookup in the References header: https://docs.gitlab.com/ee/administration/reply_by_email.html#how-it-works
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 1db1482d6b7..0e1e39501f5 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -124,7 +124,7 @@ class Notify < BaseMailer
fallback_reply_message_id = "<reply-#{reply_key}@#{Gitlab.config.gitlab.host}>".freeze
headers['References'] ||= []
- headers['References'] << fallback_reply_message_id
+ headers['References'].unshift(fallback_reply_message_id)
@reply_by_email = true
end
@@ -158,7 +158,7 @@ class Notify < BaseMailer
def mail_answer_thread(model, headers = {})
headers['Message-ID'] = "<#{SecureRandom.hex}@#{Gitlab.config.gitlab.host}>"
headers['In-Reply-To'] = message_id(model)
- headers['References'] = message_id(model)
+ headers['References'] = [message_id(model)]
headers[:subject]&.prepend('Re: ')