Skip to content
Snippets Groups Projects
Commit fe1c83cd authored by Diego Sampaio's avatar Diego Sampaio
Browse files

process outgoing webhook response as a new message

parent c4c89733
No related merge requests found
...@@ -61,8 +61,12 @@ ExecuteTriggerUrl = (url, trigger, message, room, tries=0) -> ...@@ -61,8 +61,12 @@ ExecuteTriggerUrl = (url, trigger, message, room, tries=0) ->
, Math.pow(10, tries+2) , Math.pow(10, tries+2)
return return
# TODO process return and insert message if necessary # process outgoing webhook response as a new message
else if result?.statusCode is 200 and (result.data?.text? or result.data?.attachments?)
user = RocketChat.models.Users.findOneByUsername(trigger.username)
if result.data?.text? or result.data?.attachments?
return processWebhookMessage trigger, result.data, user
ExecuteTrigger = (trigger, message, room) -> ExecuteTrigger = (trigger, message, room) ->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment