summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-15 18:14:58 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commitf6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3 (patch)
tree2291c4c92889f11e1bdbabe640205debb1e88029 /app/mailers
parent76aa0bedd7ed3aaaeab9402b78261917df66de10 (diff)
downloadgitlab-ce-f6f6aaf593dc40c79b8e3536f5e2821c96b9dcd3.tar.gz
Better notification emails for notes and (diff) discussions
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/notes.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb
index 46fa6fd9f6d..de58314fef2 100644
--- a/app/mailers/emails/notes.rb
+++ b/app/mailers/emails/notes.rb
@@ -4,7 +4,7 @@ module Emails
setup_note_mail(note_id, recipient_id)
@commit = @note.noteable
- @discussion = @note.to_discussion if @note.diff_note?
+ @discussion = @note.discussion if @note.part_of_discussion?
@target_url = namespace_project_commit_url(*note_target_url_options)
mail_answer_thread(@commit,
@@ -17,6 +17,7 @@ module Emails
setup_note_mail(note_id, recipient_id)
@issue = @note.noteable
+ @discussion = @note.discussion if @note.part_of_discussion?
@target_url = namespace_project_issue_url(*note_target_url_options)
mail_answer_thread(@issue, note_thread_options(recipient_id))
end
@@ -25,7 +26,7 @@ module Emails
setup_note_mail(note_id, recipient_id)
@merge_request = @note.noteable
- @discussion = @note.to_discussion if @note.diff_note?
+ @discussion = @note.discussion if @note.part_of_discussion?
@target_url = namespace_project_merge_request_url(*note_target_url_options)
mail_answer_thread(@merge_request, note_thread_options(recipient_id))
end
@@ -34,6 +35,7 @@ module Emails
setup_note_mail(note_id, recipient_id)
@snippet = @note.noteable
+ @discussion = @note.discussion if @note.part_of_discussion?
@target_url = namespace_project_snippet_url(*note_target_url_options)
mail_answer_thread(@snippet, note_thread_options(recipient_id))
end
@@ -42,6 +44,7 @@ module Emails
setup_note_mail(note_id, recipient_id)
@snippet = @note.noteable
+ @discussion = @note.discussion if @note.part_of_discussion?
@target_url = snippet_url(@note.noteable)
mail_answer_thread(@snippet, note_thread_options(recipient_id))
end