diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 18:14:39 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-06 18:14:39 +0300 |
commit | 55242833f832095a6fcff00b1ccacbc5900ee52a (patch) | |
tree | 6e17b16638e60099533473b540fe8f635d2f25da /app/mailers | |
parent | 7c31b0312ba0eae4e4ebe54125b13aa2ae5f5db4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/mailers')
-rw-r--r-- | app/mailers/emails/members.rb | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/app/mailers/emails/members.rb b/app/mailers/emails/members.rb index 8a9ed557cc6..ef2220751bf 100644 --- a/app/mailers/emails/members.rb +++ b/app/mailers/emails/members.rb @@ -61,7 +61,7 @@ module Emails Gitlab::Tracking.event(self.class.name, 'invite_email_sent', label: 'invite_email', property: member_id.to_s) - mail(to: member.invite_email, subject: invite_email_subject, **invite_email_headers.merge(additional_invite_settings)) do |format| + mail(to: member.invite_email, subject: invite_email_subject, **invite_email_headers) do |format| format.html { render layout: 'unknown_user_mailer' } format.text { render layout: 'unknown_user_mailer' } end @@ -151,17 +151,7 @@ module Emails def invite_email_subject if member.created_by - experiment(:invite_email_from, actor: member) do |experiment_instance| - experiment_instance.use do - subject(s_("MemberInviteEmail|%{member_name} invited you to join GitLab") % { member_name: member.created_by.name }) - end - - experiment_instance.candidate do - subject(s_("MemberInviteEmail|I've invited you to join me in GitLab")) - end - - experiment_instance.run - end + subject(s_("MemberInviteEmail|%{member_name} invited you to join GitLab") % { member_name: member.created_by.name }) else subject(s_("MemberInviteEmail|Invitation to join the %{project_or_group} %{project_or_group_name}") % { project_or_group: member_source.human_name, project_or_group_name: member_source.model_name.singular }) end @@ -178,21 +168,6 @@ module Emails end end - def additional_invite_settings - return {} unless member.created_by - - experiment(:invite_email_from, actor: member) do |experiment_instance| - experiment_instance.use { {} } - experiment_instance.candidate do - { - from: "#{member.created_by.name} <#{member.created_by.email}>" - } - end - - experiment_instance.run - end - end - def member_exists? Gitlab::AppLogger.info("Tried to send an email invitation for a deleted group. Member id: #{@member_id}") if member.blank? member.present? |