summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-15 17:01:14 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-15 17:57:26 +0200
commitb73ffbd3cb7dd89f54351b74e0cf4d1df63f0310 (patch)
treebe1ff99b35674fb522dccd40515f2d350a384ed7
parentefe962934661cd94edb1c24c6d34419cd28b82f9 (diff)
downloadgitlab-ce-fix-mention-notification.tar.gz
Fix for snippets.fix-mention-notification
-rw-r--r--app/services/notification_service.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb
index ab5a653d5c0..cfed7964c37 100644
--- a/app/services/notification_service.rb
+++ b/app/services/notification_service.rb
@@ -133,11 +133,13 @@ class NotificationService
# Add all users participating in the thread (author, assignee, comment authors)
participants =
- if target.is_a?(Commit)
+ if target.respond_to?(:participants)
+ target.participants
+ elsif target.is_a?(Commit)
author_ids = Note.for_commit_id(target.id).pluck(:author_id).uniq
User.where(id: author_ids)
else
- target.participants
+ note.mentioned_users
end
recipients = recipients.concat(participants)