diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-02 03:02:05 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-02 03:02:05 -0700 |
commit | b6d0dd871c7c8caa4809e1e8b60f6e4bb66f38c2 (patch) | |
tree | e27b9b2e5b54a9596492d7a113430d9f29e49592 /app/services | |
parent | efd1b69f68eaf6650bf84b57a4c3f6948ac204e4 (diff) | |
parent | 669ada924b3d058f5ad8bfc6822b1a9e64b3549b (diff) | |
download | gitlab-ce-b6d0dd871c7c8caa4809e1e8b60f6e4bb66f38c2.tar.gz |
Merge pull request #4618 from jacargentina/notification-on-commits
Fix notifications to handle participants and mentions on commits too
Diffstat (limited to 'app/services')
-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 b5cf5cedd6b..58ba9150d72 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 |