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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-08 12:06:38 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-08 12:06:38 +0300
commit8c12c93e07c536940fc63bf3c5ae824e96d43661 (patch)
treeec4bdaae9db949fa4dc70fb68ea187dfee77456f /app/mailers/notify.rb
parent64673acf9f75cb29d665553ba58ffb2046012eeb (diff)
parent36b255e57bae0dbfbb0e1767713bdd713c48d622 (diff)
Merge pull request #8749 from sashkab/b8748-emailheader
Addex X-GitLab-Project header to GitLab emails.
Diffstat (limited to 'app/mailers/notify.rb')
-rw-r--r--app/mailers/notify.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 45fc53fcdb2..46ead62f75f 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -111,6 +111,7 @@ class Notify < ActionMailer::Base
# See: mail_answer_thread
def mail_new_thread(model, headers = {}, &block)
headers['Message-ID'] = message_id(model)
+ headers['X-GitLab-Project'] = "#{@project.name} | " if @project
mail(headers, &block)
end
@@ -125,6 +126,7 @@ class Notify < ActionMailer::Base
def mail_answer_thread(model, headers = {}, &block)
headers['In-Reply-To'] = message_id(model)
headers['References'] = message_id(model)
+ headers['X-GitLab-Project'] = "#{@project.name} | " if @project
if (headers[:subject])
headers[:subject].prepend('Re: ')