fix actionHookDelay feature is not working properly if there is no de… (#679)

* fix actionHookDelayAction when no actions is defnied

* terminated by jambonz for giveuptimeout
This commit is contained in:
Hoan Luu Huu
2024-03-12 19:33:03 +07:00
committed by GitHub
parent 878578fe0f
commit c946a5d14d
7 changed files with 76 additions and 42 deletions

View File

@@ -177,8 +177,8 @@ class Task extends Emitter {
// 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 (this.hookDelayActionOpts) {
this.emit('ActionHookDelayActionOptions', this.hookDelayActionOpts);
}
}
if (expectResponse && json && Array.isArray(json)) {