feat actionHook delay action (#470)

* feat actionHook delay action

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
Hoan Luu Huu
2024-02-21 09:09:19 +07:00
committed by GitHub
parent 81234a583c
commit c187685054
4 changed files with 276 additions and 2 deletions

View File

@@ -173,6 +173,13 @@ class Task extends Emitter {
* first new set of verbs arrive after sending a transcript
* */
this.emit('VerbHookSpanWaitForEnd', {span});
// If actionHook delay action is configured, and ws application have not responded yet any verb for actionHook
// We have to transfer the task to call-session to await on next ws command verbs, and also run action Hook
// delay actions
if (this.actionHookDelayActionOptions) {
this.emit('ActionHookDelayActionOptions', this.actionHookDelayActionOptions);
}
}
if (expectResponse && json && Array.isArray(json)) {
const makeTask = require('./make_task');