Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7d162538
Commit
7d162538
authored
Mar 24, 2017
by
http://jneen.net/
Committed by
Felipe Artur
Apr 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send emails to the support user on new comments
parent
81375834
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
app/services/ee/notification_service.rb
app/services/ee/notification_service.rb
+22
-0
app/services/notification_service.rb
app/services/notification_service.rb
+2
-0
No files found.
app/services/ee/notification_service.rb
0 → 100644
View file @
7d162538
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
app/services/notification_service.rb
View file @
7d162538
...
...
@@ -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
#
...
...
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