Skip to content
Snippets Groups Projects
Commit 03b54f1f authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix responding to commit notes

parent 76dbafba
Branches
Tags
Loading
Pipeline #
Loading
Loading
@@ -49,9 +49,19 @@ class Notify < ActionMailer::Base
def sent_notification!(noteable, recipient_id)
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(
project: noteable.project,
noteable: noteable,
noteable_type: noteable.class.name,
noteable_id: noteable_id,
commit_id: commit_id,
recipient_id: recipient_id,
reply_key: reply_key
)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment