diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 12:06:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 12:06:01 +0000 |
commit | dea6ebd31af8e97e8b14160181bd4ea7578c94e8 (patch) | |
tree | 5e429fda4d43aa3450f7d6b015668c3474cd9e6c /app/mailers/emails/members.rb | |
parent | 94611567bd03083e0ecef7a582a174aa34844482 (diff) | |
download | gitlab-ce-dea6ebd31af8e97e8b14160181bd4ea7578c94e8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r-- | app/mailers/emails/members.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb index 76fa7236ab1..ea8032324aa 100644 --- a/app/mailers/emails/members.rb +++ b/app/mailers/emails/members.rb @@ -13,7 +13,9 @@ module Emails @member_source_type = member_source_type @member_id = member_id - mail(to: recipient(recipient_id, notification_group), + user = User.find(recipient_id) + + mail(to: user.notification_email_for(notification_group), subject: subject("Request to join the #{member_source.human_name} #{member_source.model_name.singular}")) end @@ -21,7 +23,7 @@ module Emails @member_source_type = member_source_type @member_id = member_id - mail(to: recipient(member.user, notification_group), + mail(to: member.user.notification_email_for(notification_group), subject: subject("Access to the #{member_source.human_name} #{member_source.model_name.singular} was granted")) end @@ -29,7 +31,9 @@ module Emails @member_source_type = member_source_type @member_source = member_source_class.find(source_id) - mail(to: recipient(user_id, notification_group), + user = User.find(user_id) + + mail(to: user.notification_email_for(notification_group), subject: subject("Access to the #{member_source.human_name} #{member_source.model_name.singular} was denied")) end @@ -47,7 +51,7 @@ module Emails @member_id = member_id return unless member.created_by - mail(to: recipient(member.created_by, notification_group), + mail(to: member.created_by.notification_email_for(notification_group), subject: subject('Invitation accepted')) end @@ -58,7 +62,9 @@ module Emails @member_source = member_source_class.find(source_id) @invite_email = invite_email - mail(to: recipient(created_by_id, notification_group), + user = User.find(created_by_id) + + mail(to: user.notification_email_for(notification_group), subject: subject('Invitation declined')) end |