diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 09:08:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-27 09:08:28 +0000 |
commit | 6ac4a6713ed3196af899011f7e18658e16ebaac0 (patch) | |
tree | c60237cb5203d171481b765d31bfead080d063cf /app/services | |
parent | d2b64c37bdef067656fdc8deb4728a2fbc6c2729 (diff) | |
download | gitlab-ce-6ac4a6713ed3196af899011f7e18658e16ebaac0.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notification_recipients/builder/base.rb | 7 | ||||
-rw-r--r-- | app/services/notification_recipients/builder/new_note.rb | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/app/services/notification_recipients/builder/base.rb b/app/services/notification_recipients/builder/base.rb index 3aa00c09ba2..81e6750a4ca 100644 --- a/app/services/notification_recipients/builder/base.rb +++ b/app/services/notification_recipients/builder/base.rb @@ -23,6 +23,11 @@ module NotificationRecipients raise 'abstract' end + # override if needed + def recipients_target + target + end + def project target.project end @@ -59,7 +64,7 @@ module NotificationRecipients project: project, group: group, custom_action: custom_action, - target: target, + target: recipients_target, acting_user: acting_user ) end diff --git a/app/services/notification_recipients/builder/new_note.rb b/app/services/notification_recipients/builder/new_note.rb index 27699a0d9cc..17e4728d352 100644 --- a/app/services/notification_recipients/builder/new_note.rb +++ b/app/services/notification_recipients/builder/new_note.rb @@ -12,6 +12,10 @@ module NotificationRecipients note.noteable end + def recipients_target + note + end + # NOTE: may be nil, in the case of a PersonalSnippet # # (this is okay because NotificationRecipient is written |