Commit 03b54f1f authored by Douwe Maan's avatar Douwe Maan

Fix responding to commit notes

parent 76dbafba
...@@ -49,11 +49,21 @@ class Notify < ActionMailer::Base ...@@ -49,11 +49,21 @@ class Notify < ActionMailer::Base
def sent_notification!(noteable, recipient_id) def sent_notification!(noteable, recipient_id)
return unless reply_key return unless reply_key
noteable_id = nil
commit_id = nil
if noteable.is_a?(Commit)
commit_id = noteable.id
else
noteable_id = noteable.id
end
SentNotification.create( SentNotification.create(
project: noteable.project, project: noteable.project,
noteable: noteable, noteable_type: noteable.class.name,
recipient_id: recipient_id, noteable_id: noteable_id,
reply_key: reply_key commit_id: commit_id,
recipient_id: recipient_id,
reply_key: reply_key
) )
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment