Skip to content
Snippets Groups Projects
Commit 621c6b85 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Fix commit note notification

parent 7335f366
No related branches found
No related tags found
1 merge request!1878Discussions (a.k.a. Grouped Comments)
Loading
Loading
@@ -62,12 +62,12 @@ class Notify < ActionMailer::Base
# Note
#
 
def note_commit_email(recipient_id, note_id)
def note_commit_email(commit_autor_email, note_id)
@note = Note.find(note_id)
@commit = @note.noteable
@commit = CommitDecorator.decorate(@commit)
@project = @note.project
mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))
mail(to: recipient(commit_autor_email), subject: subject("note for commit #{@commit.short_id}", @commit.title))
end
 
def note_issue_email(recipient_id, note_id)
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ class NoteObserver < ActiveRecord::Observer
notify_team(note)
elsif note.notify_author
# Notify only author of resource
Notify.note_commit_email(note.commit_author.id, note.id).deliver
Notify.note_commit_email(note.noteable.author_email, note.id).deliver
else
# Otherwise ignore it
nil
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment