diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-11 06:13:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-11 06:13:40 +0300 |
commit | 3e5f51c3717e31b741bca08639932cf6d63533c8 (patch) | |
tree | 4017a1b7a7494816a052f1ac3ebf509ddb04f915 /app/services/notification_service.rb | |
parent | 2546306238465366ac0f0c8038ac4443dc82189e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index c9b8e052bf6..b93b44ce797 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -492,6 +492,18 @@ class NotificationService mailer.member_access_denied_email(member.real_source_type, member.source_id, member.user_id).deliver_later end + def decline_invite(member) + # Must always send, regardless of project/namespace configuration since it's a + # response to the user's action. + + mailer.member_invite_declined_email( + member.real_source_type, + member.source.id, + member.invite_email, + member.created_by_id + ).deliver_later + end + # Project invite def invite_project_member(project_member, token) return true unless project_member.notifiable?(:subscription) @@ -505,18 +517,6 @@ class NotificationService mailer.member_invite_accepted_email(project_member.real_source_type, project_member.id).deliver_later end - def decline_project_invite(project_member) - # Must always send, regardless of project/namespace configuration since it's a - # response to the user's action. - - mailer.member_invite_declined_email( - project_member.real_source_type, - project_member.project.id, - project_member.invite_email, - project_member.created_by_id - ).deliver_later - end - def new_project_member(project_member) return true unless project_member.notifiable?(:mention, skip_read_ability: true) @@ -542,18 +542,6 @@ class NotificationService mailer.member_invite_accepted_email(group_member.real_source_type, group_member.id).deliver_later end - def decline_group_invite(group_member) - # Must always send, regardless of project/namespace configuration since it's a - # response to the user's action. - - mailer.member_invite_declined_email( - group_member.real_source_type, - group_member.group.id, - group_member.invite_email, - group_member.created_by_id - ).deliver_later - end - def new_group_member(group_member) return true unless group_member.notifiable?(:mention) |