Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bf88e9af
Commit
bf88e9af
authored
Jul 30, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow extensible mention type action for EE
parent
59564df1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
app/services/notification_recipient_service.rb
app/services/notification_recipient_service.rb
+7
-1
No files found.
app/services/notification_recipient_service.rb
View file @
bf88e9af
...
...
@@ -220,6 +220,8 @@ module NotificationRecipientService
end
class
Default
<
Base
MENTION_TYPE_ACTIONS
=
[
:new_issue
,
:new_merge_request
].
freeze
attr_reader
:target
attr_reader
:current_user
attr_reader
:action
...
...
@@ -252,7 +254,7 @@ module NotificationRecipientService
add_subscribed_users
if
[
:new_issue
,
:new_merge_request
]
.
include?
(
custom_action
)
if
self
.
class
.
mention_type_actions
.
include?
(
custom_action
)
# These will all be participants as well, but adding with the :mention
# type ensures that users with the mention notification level will
# receive them, too.
...
...
@@ -283,6 +285,10 @@ module NotificationRecipientService
def
custom_action
@custom_action
||=
"
#{
action
}
_
#{
target
.
class
.
model_name
.
name
.
underscore
}
"
.
to_sym
end
def
self
.
mention_type_actions
MENTION_TYPE_ACTIONS
.
dup
end
end
class
NewNote
<
Base
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment