diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 21:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 21:08:51 +0300 |
commit | ec18750aa8538712b952b8265581fc3b3e037923 (patch) | |
tree | 7eaf59fe40401415fde3c994bffae0031e2ffd23 /app/mailers/emails/members.rb | |
parent | 61265b9f01c7db3d4f6e1266d165b1c85be7b9e7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers/emails/members.rb')
-rw-r--r-- | app/mailers/emails/members.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb index 376b1a723c3..57e4c7df440 100644 --- a/app/mailers/emails/members.rb +++ b/app/mailers/emails/members.rb @@ -88,6 +88,29 @@ module Emails end end + def member_invited_reminder_email(member_source_type, member_id, token, reminder_index) + @member_source_type = member_source_type + @member_id = member_id + @token = token + @reminder_index = reminder_index + + return unless member_exists? && member.created_by && member.invite_to_unknown_user? + + subjects = { + 0 => s_("InviteReminderEmail|%{inviter}'s invitation to GitLab is pending"), + 1 => s_('InviteReminderEmail|%{inviter} is waiting for you to join GitLab'), + 2 => s_('InviteReminderEmail|%{inviter} is still waiting for you to join GitLab') + } + + subject_line = subjects[reminder_index] % { inviter: member.created_by.name } + + member_email_with_layout( + layout: 'experiment_mailer', + to: member.invite_email, + subject: subject(subject_line) + ) + end + def member_invite_accepted_email(member_source_type, member_id) @member_source_type = member_source_type @member_id = member_id |