added helscout link for emails
This commit is contained in:
parent
f298d2c2ba
commit
2d492226e3
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,8 @@ class WebhookController < ActionController::Base
|
|||
html << link_to_manager(administrateur, url)
|
||||
end
|
||||
|
||||
html << email_link_to_manager(user)
|
||||
|
||||
render json: { html: html.join('<br>') }
|
||||
end
|
||||
end
|
||||
|
@ -36,6 +38,11 @@ class WebhookController < ActionController::Base
|
|||
"<a target='_blank' href='#{url}' rel='noopener'>#{model.model_name.human}##{model.id}</a>"
|
||||
end
|
||||
|
||||
def email_link_to_manager(user)
|
||||
url = emails_manager_user_url(user)
|
||||
"<a target='_blank' href='#{url}' rel='noopener'>Emails##{user.id}</a>"
|
||||
end
|
||||
|
||||
def verify_signature!
|
||||
if generate_body_signature(request.body.read) != request.headers['X-Helpscout-Signature']
|
||||
request_http_token_authentication
|
||||
|
|
Loading…
Reference in a new issue