Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4f34d363
Commit
4f34d363
authored
Aug 19, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly set Message-ID for comment notifications.
parent
73eef57d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
app/mailers/notify.rb
app/mailers/notify.rb
+13
-11
No files found.
app/mailers/notify.rb
View file @
4f34d363
...
...
@@ -129,11 +129,7 @@ class Notify < ActionMailer::Base
"<
#{
model_name
}
_
#{
model
.
id
}
@
#{
Gitlab
.
config
.
gitlab
.
host
}
>"
end
# Send an email that starts a new conversation thread,
# with headers suitable for grouping by thread in email clients.
#
# See: mail_answer_thread
def
mail_new_thread
(
model
,
headers
=
{})
def
mail_thread
(
model
,
headers
=
{})
if
@project
headers
[
'X-GitLab-Project'
]
=
@project
.
name
headers
[
'X-GitLab-Project-Id'
]
=
@project
.
id
...
...
@@ -142,8 +138,6 @@ class Notify < ActionMailer::Base
headers
[
"X-GitLab-
#{
model
.
class
.
name
}
-ID"
]
=
model
.
id
headers
[
'Message-ID'
]
=
message_id
(
model
)
if
reply_key
headers
[
'X-GitLab-Reply-Key'
]
=
reply_key
headers
[
'Reply-To'
]
=
Gitlab
::
ReplyByEmail
.
reply_address
(
reply_key
)
...
...
@@ -152,6 +146,16 @@ class Notify < ActionMailer::Base
mail
(
headers
)
end
# Send an email that starts a new conversation thread,
# with headers suitable for grouping by thread in email clients.
#
# See: mail_answer_thread
def
mail_new_thread
(
model
,
headers
=
{})
headers
[
'Message-ID'
]
=
message_id
(
model
)
mail_thread
(
model
,
headers
)
end
# Send an email that responds to an existing conversation thread,
# with headers suitable for grouping by thread in email clients.
#
...
...
@@ -165,11 +169,9 @@ class Notify < ActionMailer::Base
headers
[
'In-Reply-To'
]
=
message_id
(
model
)
headers
[
'References'
]
=
message_id
(
model
)
if
headers
[
:subject
]
headers
[
:subject
].
prepend
(
'Re: '
)
end
headers
[
:subject
].
prepend
(
'Re: '
)
if
headers
[
:subject
]
mail_
new_
thread
(
model
,
headers
)
mail_thread
(
model
,
headers
)
end
def
can?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment