Compare commits

..

5 Commits

Author SHA1 Message Date
Dave Horton
0ea50e7bdd remove leftover merge brackets 2021-07-31 13:23:36 -04:00
Dave Horton
59cf0610dd bugfix: if enqeue task is killed because it is being replaced with new app supplied by LCC, ignore any app returned from the actionHook as LCC takes precedence 2021-07-31 13:17:44 -04:00
Dave Horton
14ab8a9639 send queue leave webhook when dequeued 2021-07-31 13:15:03 -04:00
Dave Horton
3ca47f8121 initial changes for queue webhooks 2021-07-31 13:12:48 -04:00
Dave Horton
8f7b5c959b initial changes for queue webhooks 2021-07-31 13:06:40 -04:00

View File

@@ -114,7 +114,6 @@ class TaskEnqueue extends Task {
this.bridgeDetails = opts;
this.logger.info({bridgeDetails: this.bridgeDetails}, `time to dequeue from ${this.queueName}`);
if (this._playSession) {
this._leave = false;
this._playSession.kill();
this._playSession = null;
}
@@ -234,7 +233,6 @@ class TaskEnqueue extends Task {
});
// resolve when either side hangs up
this.state = QueueResults.Bridged;
this.emitter
.on('hangup', () => {
this.logger.info('TaskEnqueue:_bridgeLocal ending with hangup from dequeue party');
@@ -327,9 +325,10 @@ class TaskEnqueue extends Task {
// check for 'leave' verb and only execute tasks up till then
const tasksToRun = [];
let leave = false;
for (const o of tasks) {
if (o.name === TaskName.Leave) {
this._leave = true;
leave = true;
this.logger.info('waitHook returned a leave task');
break;
}
@@ -349,7 +348,7 @@ class TaskEnqueue extends Task {
await this._playSession.exec();
this._playSession = null;
}
if (this._leave) {
if (leave) {
this.state = QueueResults.Leave;
this.kill(cs);
}