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>2020-12-22 15:10:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-22 15:10:09 +0300
commit5393d9eb26fb71826e048798806c05906c169e61 (patch)
treeda351541f962a10c7faf7b546946424ddc549c43 /app/services/notification_service.rb
parent081e00122e3f8d55f04a0a34485256d82a9b8933 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r--app/services/notification_service.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index 4ff462191fe..5d0414e58b8 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -347,18 +347,19 @@ class NotificationService
end
def send_service_desk_notification(note)
- return unless Gitlab::ServiceDesk.supported?
return unless note.noteable_type == 'Issue'
issue = note.noteable
- support_bot = User.support_bot
- return unless issue.external_author.present?
- return unless issue.project.service_desk_enabled?
- return if note.author == support_bot
- return unless issue.subscribed?(support_bot, issue.project)
+ return unless issue.issue_email_participants.any?
+
+ recipients = issue.email_participants_emails
+ support_bot = User.support_bot
+ recipients.delete(issue.external_author) if note.author == support_bot
- mailer.service_desk_new_note_email(issue.id, note.id).deliver_later
+ recipients.each do |recipient|
+ mailer.service_desk_new_note_email(issue.id, note.id, recipient).deliver_later
+ end
end
# Notify users when a new release is created