Add the http to the incoming webhooks, as that's very useful

pull/5876/head
Bradley Hilton 9 years ago
parent 31fd16fb54
commit d3392b8bca
No known key found for this signature in database
GPG Key ID: 0666B2C24C43C358
  1. 14
      packages/rocketchat-integrations/server/api/api.coffee

@ -18,6 +18,13 @@ getIntegrationScript = (integration) ->
return store[key] = val
get: (key) ->
return store[key]
HTTP: (method, url, options) ->
try
return {} =
result: HTTP.call method, url, options
catch e
return {} =
error: e
try
logger.incoming.info 'Will evaluate script of Trigger', integration.name
@ -176,6 +183,13 @@ executeIntegrationRest = ->
return store[key] = val
get: (key) ->
return store[key]
HTTP: (method, url, options) ->
try
return {} =
result: HTTP.call method, url, options
catch e
return {} =
error: e
script: script
request: request
result = vm.runInNewContext('script.process_incoming_request({ request: request })', sandbox, { timeout: 3000 })

Loading…
Cancel
Save