diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-13 21:10:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-13 21:10:55 +0300 |
commit | 716896e8cac8a516cd36efada8c8c5f383b63f62 (patch) | |
tree | cfa6c76580b2a3a1b48c0cb6bc9d9dc1caa211ab /app/models/members | |
parent | 9b1b702f0fc3820e13fd3810bf096687d3378dc5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/members')
-rw-r--r-- | app/models/members/group_member.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/members/group_member.rb b/app/models/members/group_member.rb index 2bbcdbbe5ce..dc300e8f540 100644 --- a/app/models/members/group_member.rb +++ b/app/models/members/group_member.rb @@ -62,7 +62,9 @@ class GroupMember < Member end def post_create_hook - run_after_commit_or_now { notification_service.new_group_member(self) } + if send_welcome_email? + run_after_commit_or_now { notification_service.new_group_member(self) } + end super end @@ -87,6 +89,10 @@ class GroupMember < Member super end + + def send_welcome_email? + true + end end GroupMember.prepend_if_ee('EE::GroupMember') |