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
0
Merge Requests
0
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
Kazuhiko Shiozaki
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
app/services/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