Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-15 18:09:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-15 18:09:07 +0300
commitf5c3f32975addd56fe8659f1c346d0e56f0b23d9 (patch)
tree9d6594793e656c52341a98d22d882d96d240433f /app/mailers
parentc8b7a349bc50cff1e8ef18204042978476527b0b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/service_desk.rb10
-rw-r--r--app/mailers/previews/notify_preview.rb2
2 files changed, 6 insertions, 6 deletions
diff --git a/app/mailers/emails/service_desk.rb b/app/mailers/emails/service_desk.rb
index 4dceff5b7ba..66eb2c646a9 100644
--- a/app/mailers/emails/service_desk.rb
+++ b/app/mailers/emails/service_desk.rb
@@ -17,18 +17,18 @@ module Emails
send_from_user_email: false,
sender_name: @project.service_desk_setting&.outgoing_name
)
- options = service_desk_options(email_sender, 'thank_you')
+ options = service_desk_options(email_sender, 'thank_you', @issue.external_author)
.merge(subject: "Re: #{subject_base}")
mail_new_thread(@issue, options)
end
- def service_desk_new_note_email(issue_id, note_id)
+ def service_desk_new_note_email(issue_id, note_id, recipient)
@note = Note.find(note_id)
setup_service_desk_mail(issue_id)
email_sender = sender(@note.author_id)
- options = service_desk_options(email_sender, 'new_note')
+ options = service_desk_options(email_sender, 'new_note', recipient)
.merge(subject: subject_base)
mail_answer_thread(@issue, options)
@@ -44,10 +44,10 @@ module Emails
@sent_notification = SentNotification.record(@issue, @support_bot.id, reply_key)
end
- def service_desk_options(email_sender, email_type)
+ def service_desk_options(email_sender, email_type, recipient)
{
from: email_sender,
- to: @issue.external_author
+ to: recipient
}.tap do |options|
next unless template_body = template_content(email_type)
diff --git a/app/mailers/previews/notify_preview.rb b/app/mailers/previews/notify_preview.rb
index 36c6f2f6c79..5fda60a7408 100644
--- a/app/mailers/previews/notify_preview.rb
+++ b/app/mailers/previews/notify_preview.rb
@@ -181,7 +181,7 @@ class NotifyPreview < ActionMailer::Preview
cleanup do
note = create_note(noteable_type: 'Issue', noteable_id: issue.id, note: 'Issue note content')
- Notify.service_desk_new_note_email(issue.id, note.id).message
+ Notify.service_desk_new_note_email(issue.id, note.id, 'someone@gitlab.com').message
end
end