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:
authorDouwe Maan <douwe@gitlab.com>2015-08-19 03:02:26 +0300
committerDouwe Maan <douwe@gitlab.com>2015-08-19 03:02:26 +0300
commit8906cabae7a6be44cafcedcaf27352614fcc462b (patch)
tree6ff7220890a5d8e22d16af0daa9689eddd0d4767 /app/mailers
parenta428838dc00dd95f5dad0e433ad2eb73df2eff0f (diff)
Changes and stuff.
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 44df3d6407d..c2ea99d9688 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -146,7 +146,7 @@ class Notify < ActionMailer::Base
if reply_key
headers['X-GitLab-Reply-Key'] = reply_key
- headers['Reply-To'] = Gitlab.config.reply_by_email.address.gsub('%{reply_key}', reply_key)
+ headers['Reply-To'] = Gitlab::ReplyByEmail.reply_address(reply_key)
end
mail(headers)
@@ -165,6 +165,10 @@ class Notify < ActionMailer::Base
headers['In-Reply-To'] = message_id(model)
headers['References'] = message_id(model)
+ if headers[:subject]
+ headers[:subject].prepend('Re: ')
+ end
+
mail_new_thread(model, headers)
end
@@ -173,8 +177,6 @@ class Notify < ActionMailer::Base
end
def reply_key
- return nil unless Gitlab.config.reply_by_email.enabled
-
- @reply_key ||= SecureRandom.hex(16)
+ @reply_key ||= Gitlab::ReplyByEmail.reply_key
end
end