Skip to content

Commit

Permalink
removedpossibleResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksanderwlodarczyk committed Dec 28, 2018
1 parent 3b547e1 commit 9a939a4
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions loaders/actions/assign_action_to_event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ function actions_loader.assign_action_to_event(action, file_name)
function(input_parameters)
log.debug("[running] action " .. ansicolors('%{underline}' .. file_name) .. " with priority " .. action.priority )
-- TODO: figure out what to do if more than one responses are returned
possibleResponse = action.action(input_parameters)
if possibleResponse ~= nil then
if possibleResponse.body ~= nil then
_G.lighttouch_response = possibleResponse
if events["outgoing_response_about_to_be_sent"] then
events["outgoing_response_about_to_be_sent"]:trigger({response = possibleResponse})
end
end
end
_G.lighttouch_response = action.action(input_parameters)
log.debug("[completed] action " .. ansicolors('%{underline}' .. file_name) )
end
)
Expand Down

0 comments on commit 9a939a4

Please sign in to comment.