Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
c643fb78
Commit
c643fb78
authored
12 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Download
Plain Diff
Merge pull request #3058 from lyda/4-1-stable
Fix sending commit note email to id instead email
parents
db958e59
c78ebc3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/mailers/notify.rb
app/mailers/notify.rb
+2
-2
app/observers/note_observer.rb
app/observers/note_observer.rb
+1
-1
No files found.
app/mailers/notify.rb
View file @
c643fb78
...
...
@@ -63,12 +63,12 @@ class Notify < ActionMailer::Base
# 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
)
...
...
This diff is collapsed.
Click to expand it.
app/observers/note_observer.rb
View file @
c643fb78
...
...
@@ -11,7 +11,7 @@ class NoteObserver < ActiveRecord::Observer
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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment