Permalink
Browse files

Merge pull request #3058 from lyda/4-1-stable

Fix sending commit note email to id instead email
  • Loading branch information...
2 parents db958e5 + c78ebc3 commit c643fb78e24b84c2657550738b88023f9bdbf26c @randx randx committed Feb 25, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 app/mailers/notify.rb
  2. +1 −1 app/observers/note_observer.rb
@@ -63,12 +63,12 @@ def reassigned_merge_request_email(recipient_id, merge_request_id, previous_assi
# Note
#
- def note_commit_email(commit_autor_email, note_id)
+ def note_commit_email(recipient_id, note_id)
@note = Note.find(note_id)
@commit = @note.noteable
@commit = CommitDecorator.decorate(@commit)
@project = @note.project
- mail(to: commit_autor_email, subject: subject("note for commit #{@commit.short_id}", @commit.title))
+ mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
end
def note_issue_email(recipient_id, note_id)
@@ -11,7 +11,7 @@ def send_notify_mails(note)
notify_team(note)
elsif note.notify_author
# Notify only author of resource
- Notify.delay.note_commit_email(note.noteable.author_email, note.id)
+ Notify.delay.note_commit_email(note.commit_author.id, note.id)
else
# Otherwise ignore it
nil

0 comments on commit c643fb7

Please sign in to comment.