BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
49f609a9
Commit
49f609a9
authored
Sep 13, 2013
by
Jakub Zienkiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notify commit author of new notes
parent
996d146c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
notification_service.rb
app/services/notification_service.rb
+7
-6
No files found.
app/services/notification_service.rb
View file @
49f609a9
...
...
@@ -107,12 +107,6 @@ class NotificationService
opts
=
{
noteable_type:
note
.
noteable_type
,
project_id:
note
.
project_id
}
if
note
.
commit_id
.
present?
opts
.
merge!
(
commit_id:
note
.
commit_id
)
else
opts
.
merge!
(
noteable_id:
note
.
noteable_id
)
end
target
=
note
.
noteable
if
target
.
respond_to?
(
:participants
)
recipients
=
target
.
participants
...
...
@@ -120,6 +114,13 @@ class NotificationService
recipients
=
note
.
mentioned_users
end
if
note
.
commit_id
.
present?
opts
.
merge!
(
commit_id:
note
.
commit_id
)
recipients
<<
note
.
commit_author
else
opts
.
merge!
(
noteable_id:
note
.
noteable_id
)
end
# Get users who left comment in thread
recipients
=
recipients
.
concat
(
User
.
where
(
id:
Note
.
where
(
opts
).
pluck
(
:author_id
)))
...
...
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