diff options
| author | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-02-24 12:12:29 +0100 |
|---|---|---|
| committer | Pierre de La Morinerie <pierre@capitainetrain.com> | 2014-06-10 17:09:15 +0200 |
| commit | de90b572d8f22708ea76ffbea9c513143fdeea2e (patch) | |
| tree | a2613e9f30ec0e5516d489b02652c64459d11323 /app/mailers/emails/notes.rb | |
| parent | 466b768bb34730ee6a24d950333c232009c34bbd (diff) | |
| download | gitlab-ce-de90b572d8f22708ea76ffbea9c513143fdeea2e.tar.gz | |
Allow more mail clients to group emails by thread
* send a ‘In-Reply-To’ header along the ‘References’ header
* subject of answers to an existing thread begins with ‘Re: ’
This fixes threading with at least Mail.app and Airmail.
Diffstat (limited to 'app/mailers/emails/notes.rb')
| -rw-r--r-- | app/mailers/emails/notes.rb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb index d6ab63fe68c..7848d34ab2b 100644 --- a/app/mailers/emails/notes.rb +++ b/app/mailers/emails/notes.rb @@ -5,9 +5,10 @@ module Emails @commit = @note.noteable @project = @note.project @target_url = project_commit_url(@project, @commit, anchor: "note_#{@note.id}") - mail(from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@commit.title} (#{@commit.short_id})")) + mail_answer_thread(@commit, + from: sender(@note.author_id), + cc: recipient(recipient_id), + subject: subject("#{@commit.title} (#{@commit.short_id})")) end def note_issue_email(recipient_id, note_id) @@ -15,10 +16,10 @@ module Emails @issue = @note.noteable @project = @note.project @target_url = project_issue_url(@project, @issue, anchor: "note_#{@note.id}") - set_reference("issue_#{@issue.id}") - mail(from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + mail_answer_thread(@issue, + from: sender(@note.author_id), + cc: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end def note_merge_request_email(recipient_id, note_id) @@ -26,10 +27,10 @@ module Emails @merge_request = @note.noteable @project = @note.project @target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{@note.id}") - set_reference("merge_request_#{@merge_request.id}") - mail(from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + mail_answer_thread(@merge_request, + from: sender(@note.author_id), + cc: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end def note_wall_email(recipient_id, note_id) |
