diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-28 14:51:25 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-28 14:51:25 +0200 |
commit | 70947fedda4f955f69d928ad0309b3f042056582 (patch) | |
tree | 849ea86bc328dafba15552a2de2f322d7f474d4d /app/services | |
parent | 618249734b1bcb8886b9d96714d278119037261c (diff) | |
download | gitlab-ce-70947fedda4f955f69d928ad0309b3f042056582.tar.gz |
inslude author & assignee to note notification recipients
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notification_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notification_service.rb b/app/services/notification_service.rb index 112a0ff0016..3c3ee39cd7b 100644 --- a/app/services/notification_service.rb +++ b/app/services/notification_service.rb @@ -106,12 +106,14 @@ class NotificationService if note.commit_id opts.merge!(commit_id: note.commit_id) + recipients = [note.commit_author] else opts.merge!(noteable_id: note.noteable_id) + recipients = [note.noteable.try(:author), note.noteable.try(:assignee)] end # Get users who left comment in thread - recipients = User.where(id: Note.where(opts).pluck(:author_id)) + recipients = recipients.concat(User.where(id: Note.where(opts).pluck(:author_id))) # Merge project watchers recipients = recipients.concat(project_watchers(note.project)).compact.uniq |