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:
authorLukas Eipert <leipert@gitlab.com>2018-10-10 15:30:40 +0300
committerLukas Eipert <leipert@gitlab.com>2018-10-16 15:54:18 +0300
commit2063dcf511acf41800f3370372b73a03b066e9f4 (patch)
treed95e1a0c862276fd9ca52d22739cc34864c890e1 /app/mailers
parente11ff3b6bc3700b93f4893903ff29c8914c70464 (diff)
Add IID headers to E-Mail notifications
These headers can be used to build URLs for API requests. Good examples would be Issues and Merge Requests
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index f7347ee61b4..662f3e00047 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -118,6 +118,7 @@ class Notify < BaseMailer
add_unsubscription_headers_and_links
headers["X-GitLab-#{model.class.name}-ID"] = model.id
+ headers["X-GitLab-#{model.class.name}-IID"] = model.iid if model.respond_to?(:iid)
headers['X-GitLab-Reply-Key'] = reply_key
@reason = headers['X-GitLab-NotificationReason']