diff options
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/notes.rb | 7 |
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 |