diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-06-18 13:41:12 +0200 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-06-18 13:41:12 +0200 |
commit | 780d868fec936327cbdf688cf6e2571b07d780c9 (patch) | |
tree | 415dce6a51954def59111fce1eeeae84d5e3d187 /app/mailers/emails | |
parent | c1ff1fdeff2692bfb0d3210709aa2df1421f0516 (diff) | |
download | gitlab-ce-780d868fec936327cbdf688cf6e2571b07d780c9.tar.gz |
Revert "Merge branch 'fix-email-threading' into 'master'"
This reverts commit 97fd990ecde387290be269ef7daafa5761f94af6, reversing
changes made to f451a697e0c018359e6d8ff3aaba4eb0484c4bee.
Conflicts:
app/mailers/emails/notes.rb
app/mailers/emails/projects.rb
Diffstat (limited to 'app/mailers/emails')
-rw-r--r-- | app/mailers/emails/groups.rb | 2 | ||||
-rw-r--r-- | app/mailers/emails/issues.rb | 32 | ||||
-rw-r--r-- | app/mailers/emails/merge_requests.rb | 32 | ||||
-rw-r--r-- | app/mailers/emails/notes.rb | 23 | ||||
-rw-r--r-- | app/mailers/emails/projects.rb | 6 |
5 files changed, 47 insertions, 48 deletions
diff --git a/app/mailers/emails/groups.rb b/app/mailers/emails/groups.rb index 39527b00e9f..1654fc55bca 100644 --- a/app/mailers/emails/groups.rb +++ b/app/mailers/emails/groups.rb @@ -4,7 +4,7 @@ module Emails @membership = UsersGroup.find(user_group_id) @group = @membership.group @target_url = group_url(@group) - mail(cc: @membership.user.email, + mail(to: @membership.user.email, subject: subject("Access to group was granted")) end end diff --git a/app/mailers/emails/issues.rb b/app/mailers/emails/issues.rb index 516e3da84c8..a096df9dc0d 100644 --- a/app/mailers/emails/issues.rb +++ b/app/mailers/emails/issues.rb @@ -4,10 +4,10 @@ module Emails @issue = Issue.find(issue_id) @project = @issue.project @target_url = project_issue_url(@project, @issue) - mail_new_thread(@issue, - from: sender(@issue.author_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + set_message_id("issue_#{issue_id}") + mail(from: sender(@issue.author_id), + to: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end def reassigned_issue_email(recipient_id, issue_id, previous_assignee_id, updated_by_user_id) @@ -15,10 +15,10 @@ module Emails @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @project = @issue.project @target_url = project_issue_url(@project, @issue) - mail_answer_thread(@issue, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + set_reference("issue_#{issue_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end def closed_issue_email(recipient_id, issue_id, updated_by_user_id) @@ -26,10 +26,10 @@ module Emails @project = @issue.project @updated_by = User.find updated_by_user_id @target_url = project_issue_url(@project, @issue) - mail_answer_thread(@issue, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + set_reference("issue_#{issue_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end def issue_status_changed_email(recipient_id, issue_id, status, updated_by_user_id) @@ -38,10 +38,10 @@ module Emails @project = @issue.project @updated_by = User.find updated_by_user_id @target_url = project_issue_url(@project, @issue) - mail_answer_thread(@issue, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + set_reference("issue_#{issue_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end end end diff --git a/app/mailers/emails/merge_requests.rb b/app/mailers/emails/merge_requests.rb index c4ca3a3b69b..ea5671c4502 100644 --- a/app/mailers/emails/merge_requests.rb +++ b/app/mailers/emails/merge_requests.rb @@ -4,10 +4,10 @@ module Emails @merge_request = MergeRequest.find(merge_request_id) @project = @merge_request.project @target_url = project_merge_request_url(@project, @merge_request) - mail_new_thread(@merge_request, - from: sender(@merge_request.author_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + set_message_id("merge_request_#{merge_request_id}") + mail(from: sender(@merge_request.author_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assignee_id, updated_by_user_id) @@ -15,10 +15,10 @@ module Emails @previous_assignee = User.find_by(id: previous_assignee_id) if previous_assignee_id @project = @merge_request.project @target_url = project_merge_request_url(@project, @merge_request) - mail_answer_thread(@merge_request, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + set_reference("merge_request_#{merge_request_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end def closed_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) @@ -26,20 +26,20 @@ module Emails @updated_by = User.find updated_by_user_id @project = @merge_request.project @target_url = project_merge_request_url(@project, @merge_request) - mail_answer_thread(@merge_request, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + set_reference("merge_request_#{merge_request_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end def merged_merge_request_email(recipient_id, merge_request_id, updated_by_user_id) @merge_request = MergeRequest.find(merge_request_id) @project = @merge_request.project @target_url = project_merge_request_url(@project, @merge_request) - mail_answer_thread(@merge_request, - from: sender(updated_by_user_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + set_reference("merge_request_#{merge_request_id}") + mail(from: sender(updated_by_user_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end end diff --git a/app/mailers/emails/notes.rb b/app/mailers/emails/notes.rb index acc6d03b5e4..b7fedbd3707 100644 --- a/app/mailers/emails/notes.rb +++ b/app/mailers/emails/notes.rb @@ -5,10 +5,9 @@ module Emails @commit = @note.noteable @project = @note.project @target_url = project_commit_url(@project, @commit, anchor: "note_#{@note.id}") - mail_answer_thread(@commit, - from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@commit.title} (#{@commit.short_id})")) + mail(from: sender(@note.author_id), + to: recipient(recipient_id), + subject: subject("#{@commit.title} (#{@commit.short_id})")) end def note_issue_email(recipient_id, note_id) @@ -16,10 +15,10 @@ module Emails @issue = @note.noteable @project = @note.project @target_url = project_issue_url(@project, @issue, anchor: "note_#{@note.id}") - mail_answer_thread(@issue, - from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@issue.title} (##{@issue.iid})")) + set_reference("issue_#{@issue.id}") + mail(from: sender(@note.author_id), + to: recipient(recipient_id), + subject: subject("#{@issue.title} (##{@issue.iid})")) end def note_merge_request_email(recipient_id, note_id) @@ -27,10 +26,10 @@ module Emails @merge_request = @note.noteable @project = @note.project @target_url = project_merge_request_url(@project, @merge_request, anchor: "note_#{@note.id}") - mail_answer_thread(@merge_request, - from: sender(@note.author_id), - cc: recipient(recipient_id), - subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) + set_reference("merge_request_#{@merge_request.id}") + mail(from: sender(@note.author_id), + to: recipient(recipient_id), + subject: subject("#{@merge_request.title} (##{@merge_request.iid})")) end end end diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb index 64878568ef8..6b13a1d746d 100644 --- a/app/mailers/emails/projects.rb +++ b/app/mailers/emails/projects.rb @@ -4,7 +4,7 @@ module Emails @users_project = UsersProject.find user_project_id @project = @users_project.project @target_url = project_url(@project) - mail(cc: @users_project.user.email, + mail(to: @users_project.user.email, subject: subject("Access to project was granted")) end @@ -12,7 +12,7 @@ module Emails @user = User.find user_id @project = Project.find project_id @target_url = project_url(@project) - mail(cc: @user.email, + mail(to: @user.email, subject: subject("Project was moved")) end @@ -32,7 +32,7 @@ module Emails end mail(from: sender(author_id), - cc: recipient, + to: recipient, subject: subject(@subject)) end end |