Commit 7d162538 authored by http://jneen.net/'s avatar http://jneen.net/ Committed by Felipe Artur

send emails to the support user on new comments

parent 81375834
module EE
module NotificationService
# override
def send_new_note_notifications(note)
super
send_service_desk_notification(note)
end
def send_service_desk_notification(note)
return true unless Gitlab::EE::ServiceDesk.enabled?
return true unless note.noteable_type == 'Issue'
issue = note.issuable
reply_to = issue.service_desk_reply_to
return nil unless issue.service_desk_reply_to.present?
return nil unless issue.project.service_desk_enabled?
return nil unless issue.subscribed?(user, issue.project)
Notify.service_desk_new_note_email(issue.id, note.id)
end
end
end
......@@ -6,6 +6,8 @@
# NotificationService.new.new_issue(issue, current_user)
#
class NotificationService
prepend EE::NotificationService
# Always notify user about ssh key added
# only if ssh key is not deploy key
#
......
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