From b73ffbd3cb7dd89f54351b74e0cf4d1df63f0310 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 15 Apr 2015 17:01:14 +0200 Subject: Fix for snippets. --- app/services/notification_service.rb | 6 ++++-- 1 file 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) -- cgit v1.2.1