diff options
author | Wei-Meng Lee <wlee@gitlab.com> | 2019-02-15 20:56:13 +0300 |
---|---|---|
committer | Wei-Meng Lee <wlee@gitlab.com> | 2019-05-31 15:49:27 +0300 |
commit | 1a402d888c05196212d1ba671368837e85246c9c (patch) | |
tree | fa4c4da1cc8eaf9268421448f7dd62a8b17ffffa /app/mailers/emails/members.rb | |
parent | 6d73ce696c02bc949b9e3e71b8c14554e43ab340 (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.rb | 3 |
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 |