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:
authorWei-Meng Lee <wlee@gitlab.com>2019-02-15 20:56:13 +0300
committerWei-Meng Lee <wlee@gitlab.com>2019-05-31 15:49:27 +0300
commit1a402d888c05196212d1ba671368837e85246c9c (patch)
treefa4c4da1cc8eaf9268421448f7dd62a8b17ffffa /app/mailers/emails/members.rb
parent6d73ce696c02bc949b9e3e71b8c14554e43ab340 (diff)
Send notifications to group-specific email address
- Select notification email by walking up group/subgroup path - Add settings UI to set group email notification address - Add tests
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r--app/mailers/emails/members.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb
index 91dfdf58982..8225215ae4d 100644
--- a/app/mailers/emails/members.rb
+++ b/app/mailers/emails/members.rb
@@ -58,9 +58,8 @@ module Emails
@member_source_type = member_source_type
@member_source = member_source_class.find(source_id)
@invite_email = invite_email
- inviter = User.find(created_by_id)
- mail(to: inviter.notification_email,
+ mail(to: recipient(created_by_id, member_source_type == 'project' ? @member_source.group : @member_source),
subject: subject('Invitation declined'))
end