Fixed invoke action
This commit is contained in:
Родитель
57f32d560c
Коммит
d9a5e46f41
|
@ -56,6 +56,7 @@ class BotFrameworkAdapter extends Adapter
|
|||
# If the command for the invoke doesn't need user input, handle the command
|
||||
# normally. If it does need user input, return a prompt for user input.
|
||||
menuCardInvoke: (invokeEvent, cb) ->
|
||||
console.log(invokeEvent)
|
||||
middleware = @using(invokeEvent.source)
|
||||
payload = middleware.maybeConstructUserInputPrompt(invokeEvent)
|
||||
if payload == null
|
||||
|
@ -63,7 +64,7 @@ class BotFrameworkAdapter extends Adapter
|
|||
delete invokeEvent.value
|
||||
@handleActivity(invokeEvent)
|
||||
else
|
||||
@sendPayload(@robot, payload)
|
||||
middleware.sendPayload(@robot, @connector, payload)
|
||||
return
|
||||
|
||||
using: (name) ->
|
||||
|
|
|
@ -44,7 +44,7 @@ describe 'HubotResponseCards', ->
|
|||
# Action
|
||||
card = null
|
||||
expect(() ->
|
||||
card = HubotResponseCards.maybeConstructResponseCard(response, query)
|
||||
card = HubotResponseCards.maybeConstructResponseCard(response, query)
|
||||
).to.not.throw()
|
||||
|
||||
# Assert
|
||||
|
@ -251,7 +251,7 @@ describe 'HubotResponseCards', ->
|
|||
# Action
|
||||
card = null
|
||||
expect(() ->
|
||||
card = HubotResponseCards.maybeConstructResponseCard(response, query)
|
||||
card = HubotResponseCards.maybeConstructResponseCard(response, query)
|
||||
).to.not.throw()
|
||||
|
||||
# Assert
|
||||
|
|
Загрузка…
Ссылка в новой задаче