diff options
author | Javier Castro <javiercastro@nexion.com.ar> | 2013-07-22 15:45:56 -0300 |
---|---|---|
committer | Javier Castro <javiercastro@nexion.com.ar> | 2013-07-24 17:04:51 -0300 |
commit | cb877b7e6f6b036a2811aec7313dab94473774de (patch) | |
tree | 262fc3b7604e4ece60f51caee8adbc94452917d4 /app/services/notification_service.rb | |
parent | 707cea8d45c45a2f840a5d053092e699912cb8a8 (diff) | |
download | gitlab-ce-cb877b7e6f6b036a2811aec7313dab94473774de.tar.gz |
Fix notifications to handle participants and mentions on commits too
Diffstat (limited to 'app/services/notification_service.rb')
-rw-r--r-- | app/services/notification_service.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index f3dc552a8e7..819b76c279c 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -106,15 +106,15 @@ class NotificationService if note.commit_id.present? opts.merge!(commit_id: note.commit_id) - recipients = [note.commit_author] else opts.merge!(noteable_id: note.noteable_id) - target = note.noteable - if target.respond_to?(:participants) - recipients = target.participants - else - recipients = [] - end + end + + target = note.noteable + if target.respond_to?(:participants) + recipients = target.participants + else + recipients = note.mentioned_users end # Get users who left comment in thread |