diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-15 17:01:14 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-15 17:57:26 +0200 |
commit | b73ffbd3cb7dd89f54351b74e0cf4d1df63f0310 (patch) | |
tree | be1ff99b35674fb522dccd40515f2d350a384ed7 | |
parent | efe962934661cd94edb1c24c6d34419cd28b82f9 (diff) | |
download | gitlab-ce-b73ffbd3cb7dd89f54351b74e0cf4d1df63f0310.tar.gz |
Fix for snippets.fix-mention-notification
-rw-r--r-- | app/services/notification_service.rb | 6 |
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) |